Skip to content

Commit

Permalink
feat(schematics): adding schematic for ng-add
Browse files Browse the repository at this point in the history
  • Loading branch information
Domainv committed Oct 10, 2018
1 parent 1274612 commit dfccfe4
Show file tree
Hide file tree
Showing 16 changed files with 2,464 additions and 40 deletions.
209 changes: 172 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "ngx-bootstrap-base",
"version": "3.0.1",
"description": "Native Angular Bootstrap Components",
"schematics": "./schematics/src/collection.json",
"private": true,
"scripts": {
"lite-server": "lite-server -c scripts/bs-config.js",
Expand All @@ -22,8 +23,9 @@
"disable-lint": "tslint \"**/*.ts\" -c tslint.json --fix --type-check -t prose -e \"node_modules/**\" -e \"dist/**\" -e \"temp/**\" -e \"scripts/docs/**\"",
"flow.changelog": "conventional-changelog -i CHANGELOG.md -s -p angular",
"flow.github-release": "conventional-github-releaser -p angular",
"build": "run-s build.modules build.sass build.es2015",
"build": "run-s build.modules build:schematics build.sass build.es2015",
"build.watch": "node scripts/build-modules --watch",
"build:schematics": "node scripts/schematics/build",
"build.modules": "node scripts/build-modules",
"build.sass": "node-sass --recursive src --output dist --source-map true --source-map-contents sass",
"build.es2015": "node ./scripts/es2015/bundle.es2015.js",
Expand Down Expand Up @@ -73,6 +75,8 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "0.6.1",
"@angular-devkit/core": "7.0.0-rc.1",
"@angular-devkit/schematics": "7.0.0-rc.1",
"@angular/animations": "6.0.1",
"@angular/cli": "6.1.5",
"@angular/common": "6.0.1",
Expand All @@ -90,6 +94,7 @@
"@bahmutov/add-typescript-to-cypress": "2.0.0",
"@nguniversal/express-engine": "6.0.0",
"@nguniversal/module-map-ngfactory-loader": "6.0.0",
"@schematics/angular": "7.0.0-rc.1",
"@types/chai": "4.1.3",
"@types/jasmine": "2.8.7",
"@types/marked": "0.3.0",
Expand Down Expand Up @@ -148,7 +153,7 @@
"tslint": "5.10.0",
"tslint-config-valorsoft": "2.1.1",
"typedoc": "0.11.1",
"typescript": "~2.7.2",
"typescript": "2.7.2",
"wait-on": "2.1.0",
"wallaby-webpack": "3.9.7",
"webpack-bundle-analyzer": "2.11.3",
Expand Down
18 changes: 18 additions & 0 deletions schematics/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Outputs
src/**/*.js
src/**/*.js.map
src/**/*.d.ts

# IDEs
.idea/
jsconfig.json
.vscode/

# Misc
node_modules/
npm-debug.log*
yarn-error.log*

# Mac OSX Finder files.
**/.DS_Store
.DS_Store
3 changes: 3 additions & 0 deletions schematics/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignores TypeScript files, but keeps definitions.
*.ts
!*.d.ts
28 changes: 28 additions & 0 deletions schematics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Getting Started With Schematics

This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.

### Testing

To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.

Check the documentation with
```bash
schematics --help
```

### Unit Testing

`npm run test` will run the unit tests, using Jasmine as a runner and test framework.

### Publishing

To publish, simply do:

```bash
npm run build
npm publish
```

That's it!

Loading

0 comments on commit dfccfe4

Please sign in to comment.