Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pre/postpublish tasks #144

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ ng2-bootstrap.js
ng2-bootstrap.d.ts
ng2-bootstrap.js.map
/logs

# npm package source
/ts
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ coverage
demo
demo-build
webpack.config.js

# source typescript
ng2-bootstrap.ts
components/**/*.ts
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "angular2 bootstrap components",
"scripts": {
"compile": "./node_modules/.bin/tsc",
"prepublish": "./node_modules/.bin/tsc && ./make.js",
"prepublish": "./node_modules/.bin/tsc && ./make.js && node ./pre-publish-npm.js",
"publish:gh-pages": "./gh-pages-publish.js",
"postpublish": "npm run build:prod && npm run publish:gh-pages",
"build:prod": "NODE_ENV=production ./node_modules/.bin/webpack --progress --color",
Expand Down Expand Up @@ -46,6 +46,7 @@
"bootstrap": "3.3.6",
"compression-webpack-plugin": "0.2.0",
"copy-webpack-plugin": "1.1.1",
"cpy": "^4.0.0",
"del": "2.2.0",
"es6-promise": "3.0.2",
"es6-shim": "0.33.3",
Expand Down
14 changes: 14 additions & 0 deletions pre-publish-npm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env node
/*eslint no-console: 0, no-sync: 0*/
'use strict';

var cpy = require('cpy');

var tsSource = [
'**/*.ts',
'!**/*.d.ts',
'!node_modules/**/*.ts',
'!demo/**/*.ts'
];

cpy(tsSource, 'ts', {parents: true});