From 81e16b76390e2e5eb22cb39850518a0b1d8ed11b Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Mon, 4 Apr 2016 17:50:49 +0300 Subject: [PATCH 1/7] fix(build): generate source maps for systemjs bundles (fixes #367) --- make.js => .config/bundle-system.js | 11 ++++--- .npmignore | 1 - clean.js | 7 ---- gh-pages-publish.js | 15 --------- package.json | 50 +++++++++++++++++------------ 5 files changed, 36 insertions(+), 48 deletions(-) rename make.js => .config/bundle-system.js (89%) delete mode 100755 clean.js delete mode 100755 gh-pages-publish.js diff --git a/make.js b/.config/bundle-system.js similarity index 89% rename from make.js rename to .config/bundle-system.js index db2904aa13..1894fa218c 100755 --- a/make.js +++ b/.config/bundle-system.js @@ -14,14 +14,14 @@ const zlib = require('zlib'); const async = require('async'); const Builder = require('systemjs-builder'); -const pkg = require('./package.json'); +const pkg = require('../package.json'); const name = pkg.name; -const targetFolder = 'bundles'; - +const targetFolder = path.resolve('./bundles'); +console.log(targetFolder) async.waterfall([ cleanBundlesFolder, getSystemJsBundleConfig, - buildSystemJs({mangle: false}), + buildSystemJs({minify: false, sourceMaps: true, mangle: false}), getSystemJsBundleConfig, buildSystemJs({minify: true, sourceMaps: true, mangle: false}), gzipSystemJsBundle @@ -49,10 +49,11 @@ function getSystemJsBundleConfig(cb) { }; config.meta = ['angular2', 'rxjs'].reduce((memo, currentValue) => { - memo[`${__dirname}/node_modules/${currentValue}/*`] = {build: false}; + memo[path.resolve(`node_modules/${currentValue}/*`)] = {build: false}; return memo; }, {}); config.meta.moment = {build: false}; + console.log(config.meta) return cb(null, config); } diff --git a/.npmignore b/.npmignore index 8c6e2e5d04..8f189f28c3 100644 --- a/.npmignore +++ b/.npmignore @@ -20,6 +20,5 @@ webpack.config.js *.js.map !*.d.ts /components/**/*.ts -/components/**/*.js.map !/components/**/*.d.ts diff --git a/clean.js b/clean.js deleted file mode 100755 index 2d2fa22f28..0000000000 --- a/clean.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -/*eslint no-console: 0, no-sync: 0*/ -const del = require('del'); - -console.log(del.sync(['components/**/*.+(js|d.ts|js.map)'])); diff --git a/gh-pages-publish.js b/gh-pages-publish.js deleted file mode 100755 index 93b4947f18..0000000000 --- a/gh-pages-publish.js +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node - -/*eslint no-console: 0, no-sync: 0*/ -'use strict'; - -const ghpages = require('gh-pages'); -const path = require('path'); - -ghpages.publish(path.join(__dirname, 'demo-build'), err => { - if (err) { - console.log('Error while publish gh-pages'); - throw err; - } - console.log('gh-pages published successfully'); -}); diff --git a/package.json b/package.json index ffbb86a316..e59df39db3 100644 --- a/package.json +++ b/package.json @@ -3,28 +3,38 @@ "version": "1.0.10", "description": "angular2 bootstrap components", "scripts": { - "install:typings": "./node_modules/.bin/typings install", - "compile": "./node_modules/.bin/tsc", - "copy:src": "./node_modules/.bin/cpy ng2-bootstrap.ts \"components/*.ts\" ts --parents", - "clean:dist": "./node_modules/.bin/del bundles coverage demo-build typings", - "publish:gh-pages": "./gh-pages-publish.js", - "prepublish": "npm run install:typings && npm run compile && ./make.js", - "postpublish": "npm run build:prod && npm run publish:gh-pages", - "build:prod": "NODE_ENV=production ./node_modules/.bin/webpack --progress --color", - "build:dev": "./node_modules/.bin/webpack --progress --color", - "serve:dev": "./node_modules/.bin/webpack-dev-server --hot --inline --colors --display-error-details --display-cached", - "serve:prod": "NODE_ENV=production ./node_modules/.bin/webpack-dev-server --hot --inline --colors --display-error-details --display-cached", - "start": "npm run serve:dev", - "pretest": "npm run lint", + "flow.install:typings": "./node_modules/.bin/typings install", + "flow.compile": "npm run flow.install:typings && npm run flow.compile:common && npm run flow.compile:system ", + "flow.compile:common": "./node_modules/.bin/tsc", + "flow.compile:system": "./.config/bundle-system.js", + + "flow.copy:src": "./node_modules/.bin/cpy ng2-bootstrap.ts \"components/*.ts\" ts --parents", + "flow.clean": "./node_modules/.bin/del bundles coverage demo-build typings \"components/**/*.+(js|d.ts|js.map)\" dist \"ng2-bootstrap.+(js|d.ts|js.map)\"", + "flow.deploy:gh-pages": "npm run flow.build:prod && ./node_modules/.bin/gh-pages -d demo-build", + + "flow.eslint": "./node_modules/.bin/eslint --ignore-path .gitignore --ext js --fix . .config", + "flow.tslint": "./node_modules/.bin/gulp lint", + "flow.lint": "npm run flow.eslint && npm run flow.tslint", + + "flow.changelog": "./node_modules/.bin/conventional-changelog -i CHANGELOG.md -s -p angular -v", + "flow.github-release": "conventional-github-releaser -p angular", + + "flow.build:prod": "NODE_ENV=production ./node_modules/.bin/webpack --progress --color", + "flow.build:dev": "./node_modules/.bin/webpack --progress --color", + "flow.serve:dev": "./node_modules/.bin/webpack-dev-server --hot --inline --colors --display-error-details --display-cached", + "flow.serve:prod": "NODE_ENV=production ./node_modules/.bin/webpack-dev-server --hot --inline --colors --display-error-details --display-cached", + + "prepublish": "npm run flow.clean && npm run flow.compile", + "postpublish": "npm run flow.deploy:gh-pages", + + "start": "npm run flow.serve:dev", + + "pretest": "npm run flow.lint", "test": "NODE_ENV=test ./node_modules/.bin/karma start", - "changelog": "./node_modules/.bin/conventional-changelog -i CHANGELOG.md -s -p angular -v", + "preversion": "npm test", - "version": "npm run changelog && git add -A", - "postversion": "git push origin master && git push --tags", - "github-release": "conventional-github-releaser -p angular", - "eslint": "./node_modules/.bin/eslint --ignore-path .gitignore --ext js --fix . .config", - "lint": "npm run eslint && npm run tslint", - "tslint": "./node_modules/.bin/gulp lint" + "version": "npm run flow.changelog && git add -A", + "postversion": "git push origin master && git push --tags" }, "main": "ng2-bootstrap.js", "typings": "ng2-bootstrap.d.ts", From 46ce3a62a9a91e47137c4bcf203e0803f746295f Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Mon, 4 Apr 2016 18:36:52 +0300 Subject: [PATCH 2/7] chore(build): update travis config --- .travis.yml | 2 +- package.json | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 38b44ab66e..1e9bb2051d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ before_install: - npm install -g npm@latest script: -- npm run install:typings +- npm run flow.install:typings - npm test addons: diff --git a/package.json b/package.json index e59df39db3..3c0770df33 100644 --- a/package.json +++ b/package.json @@ -7,31 +7,23 @@ "flow.compile": "npm run flow.install:typings && npm run flow.compile:common && npm run flow.compile:system ", "flow.compile:common": "./node_modules/.bin/tsc", "flow.compile:system": "./.config/bundle-system.js", - "flow.copy:src": "./node_modules/.bin/cpy ng2-bootstrap.ts \"components/*.ts\" ts --parents", "flow.clean": "./node_modules/.bin/del bundles coverage demo-build typings \"components/**/*.+(js|d.ts|js.map)\" dist \"ng2-bootstrap.+(js|d.ts|js.map)\"", "flow.deploy:gh-pages": "npm run flow.build:prod && ./node_modules/.bin/gh-pages -d demo-build", - "flow.eslint": "./node_modules/.bin/eslint --ignore-path .gitignore --ext js --fix . .config", "flow.tslint": "./node_modules/.bin/gulp lint", "flow.lint": "npm run flow.eslint && npm run flow.tslint", - "flow.changelog": "./node_modules/.bin/conventional-changelog -i CHANGELOG.md -s -p angular -v", "flow.github-release": "conventional-github-releaser -p angular", - "flow.build:prod": "NODE_ENV=production ./node_modules/.bin/webpack --progress --color", "flow.build:dev": "./node_modules/.bin/webpack --progress --color", "flow.serve:dev": "./node_modules/.bin/webpack-dev-server --hot --inline --colors --display-error-details --display-cached", "flow.serve:prod": "NODE_ENV=production ./node_modules/.bin/webpack-dev-server --hot --inline --colors --display-error-details --display-cached", - "prepublish": "npm run flow.clean && npm run flow.compile", "postpublish": "npm run flow.deploy:gh-pages", - "start": "npm run flow.serve:dev", - "pretest": "npm run flow.lint", "test": "NODE_ENV=test ./node_modules/.bin/karma start", - "preversion": "npm test", "version": "npm run flow.changelog && git add -A", "postversion": "git push origin master && git push --tags" @@ -113,7 +105,7 @@ "ts-loader": "0.8.1", "tslint": "3.6.0", "typescript": "1.8.9", - "typings": "0.7.11", + "typings": "0.7.12", "webpack": "1.12.14", "webpack-dev-server": "1.14.1", "zone.js": "0.6.8" From ef67aef207d4907cacb3739bafe25c6eb35215c8 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Mon, 4 Apr 2016 19:06:51 +0300 Subject: [PATCH 3/7] chore(package): update lite-server to version 2.2.0 http://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3c0770df33..9ed2bff48a 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "karma-sourcemap-loader": "0.3.7", "karma-spec-reporter": "0.0.25", "karma-webpack": "1.7.0", - "lite-server": "2.1.0", + "lite-server": "2.2.0", "markdown-loader": "0.1.7", "marked": "0.3.5", "phantomjs-polyfill": "0.0.2", From cad6af366e4e90bf2315ab48c02ef9ba3c1fe0e3 Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Thu, 7 Apr 2016 18:49:12 +0300 Subject: [PATCH 4/7] fix(lint): added usage of tslint-config-valorsoft --- package.json | 2 +- tslint.json | 90 ++-------------------------------------------------- 2 files changed, 3 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 9ed2bff48a..c167083e1f 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "source-map-loader": "0.1.5", "systemjs-builder": "0.15.14", "ts-loader": "0.8.1", - "tslint": "3.6.0", + "tslint-config-valorsoft": "0.0.3", "typescript": "1.8.9", "typings": "0.7.12", "webpack": "1.12.14", diff --git a/tslint.json b/tslint.json index 437f5fb50c..119e1146ab 100644 --- a/tslint.json +++ b/tslint.json @@ -1,90 +1,4 @@ { - "rulesDirectory": "./node_modules/codelyzer/dist/src", - "rules": { - "align": [true, "parameters", "statements"], - "ban": false, - "class-name": true, - "comment-format": [true, "check-space"], - "curly": true, - "eofline": true, - "forin": true, - "indent": [true, "spaces"], - "interface-name": [true, "never-prefix"], - "jsdoc-format": true, - "label-position": true, - "label-undefined": true, - "max-line-length": true, - "member-access": [true, "check-accessor", "check-constructor"], - "member-ordering": [ - true, "public-before-private", "static-before-instance", - "variables-before-functions" - ], - "no-any": false, - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-consecutive-blank-lines": true, - "no-console": true, - "no-construct": true, - "no-constructor-vars": true, - "no-debugger": true, - "no-duplicate-key": true, - "no-duplicate-variable": true, - "no-eval": true, - "no-inferrable-types": true, - "no-internal-module": true, - "no-null-keyword": true, - "no-require-imports": false, - "no-shadowed-variable": true, - "no-string-literal": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unreachable": true, - "no-unused-expression": true, - "no-unused-variable": [true, "check-parameters"], - "no-use-before-declare": true, - "no-var-keyword": true, - "no-var-requires": false, - "object-literal-sort-keys": false, - "one-line": [ - true, "check-catch", "check-else", "check-open-brace", "check-whitespace" - ], - "quotemark": [true, "single"], - "radix": true, - "semicolon": [true, "always"], - "switch-default": true, - "triple-equals": [true, "allow-null-check"], - "typedef": [ - true, "call-signature", "parameter", "arrow-parameter", - "property-declaration", "member-variable-declaration" - ], - "typedef-whitespace": [ - true, { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "use-strict": [true, "check-module"], - "variable-name": [true, "ban-keywords"], - "whitespace": [ - false, "check-branch", "check-decl", "check-operator", "check-module", - "check-separator", "check-type", "check-typecast" - ], - "directive-selector-name": [true, "camelCase"], - "component-selector-name": [true, "kebab-case"], - "directive-selector-type": [true, "attribute"], - "component-selector-type": [true, "element"], - "directive-selector-prefix": [false], - "component-selector-prefix": [false], - "host-parameter-decorator": true, - "input-parameter-decorator": true, - "output-parameter-decorator": true, - "attribute-parameter-decorator": true, - "input-property-directive": true, - "output-property-directive": true, - "call-forward-ref": true - } + "extends": "./node_modules/tslint-config-valorsoft/tslint.json", + "rulesDirectory": "./node_modules/codelyzer/dist/src" } From 243585b70f2dfea7793d8db9ab36149a051e3eb4 Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Fri, 8 Apr 2016 16:54:28 +0300 Subject: [PATCH 5/7] feat(package): updated to angular2 beta.14 --- .eslintrc.json | 2 +- package.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 888850efde..f8afe9932f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/eslint-config-valorsoft/.eslintrc", + "extends": "./node_modules/eslint-config-valorsoft/.eslintrc.json", "env": { "node": true } diff --git a/package.json b/package.json index c167083e1f..aa880b7177 100644 --- a/package.json +++ b/package.json @@ -47,15 +47,15 @@ }, "homepage": "https://github.com/valor-software/ng2-bootstrap#readme", "dependencies": { + "angular2": "2.0.0-beta.14", "moment": "2.12.0" }, "peerDependencies": { - "angular2": "2.0.0-beta.13" + "angular2": "2.0.0-beta.14" }, "devDependencies": { - "angular2": "2.0.0-beta.13", "async": "1.5.2", - "balanced-match": "0.3.0", + "balanced-match": "0.4.0", "bootstrap": "3.3.6", "codelyzer": "0.0.12", "compression-webpack-plugin": "0.3.1", @@ -69,7 +69,7 @@ "es6-promise": "3.1.2", "es6-shim": "0.35.0", "es7-reflect-metadata": "1.6.0", - "eslint-config-valorsoft": "0.0.9", + "eslint-config-valorsoft": "0.0.10", "exports-loader": "0.6.3", "file-loader": "0.8.5", "gh-pages": "0.11.0", @@ -86,7 +86,7 @@ "karma-jasmine": "0.3.8", "karma-phantomjs-launcher": "1.0.0", "karma-sourcemap-loader": "0.3.7", - "karma-spec-reporter": "0.0.25", + "karma-spec-reporter": "0.0.26", "karma-webpack": "1.7.0", "lite-server": "2.2.0", "markdown-loader": "0.1.7", @@ -108,6 +108,6 @@ "typings": "0.7.12", "webpack": "1.12.14", "webpack-dev-server": "1.14.1", - "zone.js": "0.6.8" + "zone.js": "0.6.10" } } From ba1576ee170eb029034c416dc8106fc7614870e5 Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Fri, 8 Apr 2016 16:59:08 +0300 Subject: [PATCH 6/7] 1.0.11 --- CHANGELOG.md | 18 ++++++++++++++++++ package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7e9cc1fe3..45726b4281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ + +## [1.0.11](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.10...v1.0.11) (2016-04-08) + + +### Bug Fixes + +* **build:** generate source maps for systemjs bundles (fixes #367) ([81e16b7](https://github.com/valor-software/ng2-bootstrap/commit/81e16b7)), closes [#367](https://github.com/valor-software/ng2-bootstrap/issues/367) +* **demo:** added card clasess to pre tags in bs4 demo ([0dfe7b2](https://github.com/valor-software/ng2-bootstrap/commit/0dfe7b2)) +* **lint:** added usage of tslint-config-valorsoft ([cad6af3](https://github.com/valor-software/ng2-bootstrap/commit/cad6af3)) +* **lint:** enable tslint and codelyzer (fixes #309) ([b60ce40](https://github.com/valor-software/ng2-bootstrap/commit/b60ce40)), closes [#309](https://github.com/valor-software/ng2-bootstrap/issues/309) +* **typeahead:** prevent form submition when typeahead selected (fixes #359) ([4297410](https://github.com/valor-software/ng2-bootstrap/commit/4297410)), closes [#359](https://github.com/valor-software/ng2-bootstrap/issues/359) + +### Features + +* **package:** updated to angular2 beta.14 ([243585b](https://github.com/valor-software/ng2-bootstrap/commit/243585b)) + + + ## [1.0.10](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.9...v1.0.10) (2016-04-01) diff --git a/package.json b/package.json index aa880b7177..fd97a3830d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng2-bootstrap", - "version": "1.0.10", + "version": "1.0.11", "description": "angular2 bootstrap components", "scripts": { "flow.install:typings": "./node_modules/.bin/typings install", From 70901ecfe7af3b7eb8638d236c78f73e0616f216 Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Fri, 8 Apr 2016 17:02:42 +0300 Subject: [PATCH 7/7] chore(release): default branch changed to development --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd97a3830d..6e2b079861 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "test": "NODE_ENV=test ./node_modules/.bin/karma start", "preversion": "npm test", "version": "npm run flow.changelog && git add -A", - "postversion": "git push origin master && git push --tags" + "postversion": "git push origin development && git push --tags" }, "main": "ng2-bootstrap.js", "typings": "ng2-bootstrap.d.ts",