Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 2a07bb5

Browse files
committed
refactor: break the schematics into a separate NPM package
add readme files fix tests
1 parent 73419ec commit 2a07bb5

File tree

16 files changed

+99
-63
lines changed

16 files changed

+99
-63
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
projects/*/src/**/*.js
5-
projects/*/src/**/*.js.map
6-
projects/*/src/**/*.d.ts
4+
projects/schematics/src/**/*.js
5+
projects/schematics/src/**/*.js.map
6+
projects/schematics/src/**/*.d.ts
77
/dist
88
/tmp
99
/out-tsc

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
# DevDemo
1+
# DevIntent Application Development Tools
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.0-rc.2.
3+
This root project contains a demo app, in [src/](src/), that demonstrates the features of the
4+
[@devintent/dev](projects/dev) application development library.
5+
6+
This repository also includes [@devintent/schematics](projects/schematics) which provide code generation
7+
based upon the modules in the `@devintent/dev` library.
48

59
## Development server
610

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
11+
Run `npm start` to serve the demo app in a dev server.
12+
Navigate to `http://localhost:4200/`.
13+
The app will automatically reload if you change any of the source files.
814

915
## Code scaffolding
1016

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
17+
Run `ng generate component component-name` to generate a new component. You can also use
18+
`ng generate directive|pipe|service|class|guard|interface|enum|module`.
1219

1320
## Build
1421

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
22+
- Run `npm run build` to build the demo project.
23+
The build artifacts will be stored in the `dist/dev-demo` directory.
24+
- Run `npm run build:lib` to build the library project.
25+
The build artifacts will be stored in the `dist/dev` directory.
26+
- Run `npm run build:schematics` to build the schematics project.
1627

1728
## Running unit tests
1829

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
"version": "0.0.1",
44
"scripts": {
55
"ng": "ng",
6-
"start": "ng serve",
7-
"copy:schematics": "cp -r ./projects/dev/src/schematics/* ./dist/dev/schematics",
8-
"build": "ng build",
9-
"build:schematics": "tsc -p ./projects/dev/src/schematics/.tsconfig.json && npm run copy:schematics",
10-
"build:lib": "ng build dev && npm run build:schematics",
11-
"test": "ng test",
6+
"start": "ng serve dev-demo",
7+
"build": "ng build dev-demo",
8+
"build:lib": "ng build dev",
9+
"build:schematics": "tsc -p ./projects/schematics/tsconfig.json",
10+
"publish:lib": "npm run lint && npm run build:lib && npm publish ./dist/dev --access public",
11+
"publish:schematics": "npm run build:schematics && npm publish ./projects/schematics --access public",
12+
"test": "ng test && npm run test:schematics",
13+
"test:schematics": "npm run build:schematics && jasmine ./projects/schematics/src/**/*_spec.js",
1214
"lint": "ng lint",
1315
"e2e": "ng e2e"
1416
},

projects/dev/.npmignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

projects/dev/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# DevIntent Application Development Library
2+
3+
This library is still in the experimental phase.
4+
5+
The goal is to compose lower level Angular Material components into higher level components that
6+
are built with a focus on rapid application development.

projects/dev/karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ module.exports = function(config) {
2424
port: 9876,
2525
colors: true,
2626
logLevel: config.LOG_INFO,
27-
autoWatch: true,
27+
autoWatch: false,
2828
browsers: ['Chrome'],
29-
singleRun: false
29+
singleRun: true
3030
});
3131
};

projects/dev/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@devintent/dev",
3-
"version": "0.0.1",
4-
"description": "Application Development Library and Schematics",
3+
"version": "0.0.2",
4+
"description": "Application Development Library",
55
"keywords": [
6-
"schematics", "material", "design", "angular", "material design", "components"
6+
"material", "design", "angular", "material design", "components"
77
],
88
"author": "Michael Prentice",
99
"license": "MIT",
10-
"schematics": "./schematics/collection.json",
10+
"private": false,
1111
"dependencies": {
1212
"tslib": "^1.9.3"
1313
},

projects/dev/src/schematics/.tsconfig.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

projects/schematics/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# DevIntent Application Development Schematics
2+
3+
These schematics are still in the experimental phase.
4+
5+
These schematics generate code that leverages the components in the
6+
[@devintent/dev](https://www.npmjs.com/package/@devintent/dev) application development library.
7+
The goal is to increase developer productivity, especially when starting a new project.

projects/schematics/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "@devintent/schematics",
3+
"version": "0.0.1",
4+
"description": "Application Development Schematics",
5+
"keywords": [
6+
"schematics", "material", "design", "angular", "material design", "components"
7+
],
8+
"author": "Michael Prentice",
9+
"license": "MIT",
10+
"private": false,
11+
"schematics": "./src/collection.json"
12+
}

0 commit comments

Comments
 (0)