Skip to content

Commit 4a6eac4

Browse files
committed
First commit
1 parent df8ad84 commit 4a6eac4

File tree

18 files changed

+3050
-1
lines changed

18 files changed

+3050
-1
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Outputs
2+
src/**/*.js
3+
src/**/*.js.map
4+
src/**/*.d.ts
5+
6+
# IDEs
7+
.idea/
8+
jsconfig.json
9+
.vscode/
10+
11+
# Misc
12+
node_modules/
13+
npm-debug.log*
14+
yarn-error.log*
15+
16+
# Mac OSX Finder files.
17+
**/.DS_Store
18+
.DS_Store

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignores TypeScript files, but keeps definitions.
2+
!*.d.ts

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
# cap-angular-schematic-bootstrap
1+
# schematics
2+
ng-bootstrap schematics collection for angular-cli

create_package.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const fs = require('fs');
2+
3+
// read oryginal package .json
4+
const pkgJson = require('./package.json');
5+
6+
const targetPkgJson = {};
7+
8+
// copy some of the package.json fields from src to dest
9+
['name', 'version', 'description', 'keywords', 'author', 'repository', 'license', 'bugs', 'homepage'].forEach(function (field) {
10+
targetPkgJson[field] = pkgJson[field];
11+
});
12+
13+
// add dependencies (use the same versions as in the oryginal package.json)
14+
targetPkgJson.dependencies = {};
15+
['@angular-devkit/core', '@angular-devkit/schematics', 'typescript'].forEach(function(depPkg) {
16+
targetPkgJson.dependencies[depPkg] = pkgJson.devDependencies[depPkg];
17+
});
18+
19+
// add schematics entry
20+
targetPkgJson['schematics'] = './collection.json';
21+
22+
// add keywords (https://twitter.com/stephenfluin/status/981979735839277056)
23+
targetPkgJson.keywords = ['angular', 'ng-bootstrap', 'ng-add'];
24+
25+
// write down resulting package.json
26+
fs.writeFileSync('dist/package.json', JSON.stringify(targetPkgJson, null, 2), 'utf8');

0 commit comments

Comments
 (0)