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/.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/.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/.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/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/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..6e2b079861 100644 --- a/package.json +++ b/package.json @@ -1,30 +1,32 @@ { "name": "ng2-bootstrap", - "version": "1.0.10", + "version": "1.0.11", "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 development && git push --tags" }, "main": "ng2-bootstrap.js", "typings": "ng2-bootstrap.d.ts", @@ -45,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", @@ -67,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", @@ -84,9 +86,9 @@ "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.1.0", + "lite-server": "2.2.0", "markdown-loader": "0.1.7", "marked": "0.3.5", "phantomjs-polyfill": "0.0.2", @@ -101,11 +103,11 @@ "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.11", + "typings": "0.7.12", "webpack": "1.12.14", "webpack-dev-server": "1.14.1", - "zone.js": "0.6.8" + "zone.js": "0.6.10" } } 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" }