Skip to content

Commit

Permalink
Merge pull request #39 from pzuraq/fastboot-1.0
Browse files Browse the repository at this point in the history
Fix breaking changes in FastBoot 1.0
  • Loading branch information
zeiv committed Jun 28, 2017
2 parents 45e38a2 + 2d71f1b commit 9da72c7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 22 deletions.
36 changes: 18 additions & 18 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
/* eslint-env node */
'use strict';

const fastbootTransform = require('fastboot-transform');

const filesToImport = [
'dependencyLibs/inputmask.dependencyLib.js',
'inputmask.js',
'inputmask.extensions.js',
'inputmask.date.extensions.js',
'inputmask.numeric.extensions.js',
'inputmask.phone.extensions.js'
];

module.exports = {
name: 'ember-inputmask',
options: {
nodeAssets: {
'inputmask': {
vendor: [
'dist/inputmask/dependencyLibs/inputmask.dependencyLib.js',
'dist/inputmask/inputmask.js',
'dist/inputmask/inputmask.extensions.js',
'dist/inputmask/inputmask.date.extensions.js',
'dist/inputmask/inputmask.numeric.extensions.js',
'dist/inputmask/inputmask.phone.extensions.js'
]
}
inputmask: () => ({
vendor: filesToImport.map(file => `dist/inputmask/${file}`),
processTree: input => fastbootTransform(input)
})
}
},
included() {
this._super.included.apply(this, arguments);
if (!process.env.EMBER_CLI_FASTBOOT) {
this.import('vendor/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.js');
this.import('vendor/inputmask/dist/inputmask/inputmask.js');
this.import('vendor/inputmask/dist/inputmask/inputmask.extensions.js');
this.import('vendor/inputmask/dist/inputmask/inputmask.date.extensions.js');
this.import('vendor/inputmask/dist/inputmask/inputmask.numeric.extensions.js');
this.import('vendor/inputmask/dist/inputmask/inputmask.phone.extensions.js');
}
filesToImport.forEach(file => {
this.import(`vendor/inputmask/dist/inputmask/${file}`);
});
}
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli-node-assets": "^0.2.2",
"fastboot-transform": "^0.1.1",
"inputmask": "3.3.6"
},
"devDependencies": {
Expand Down
45 changes: 41 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,18 @@ broccoli-config-replace@^1.1.2:
debug "^2.2.0"
fs-extra "^0.24.0"

broccoli-debug@^0.6.1:
version "0.6.2"
resolved "https://registry.yarnpkg.com/broccoli-debug/-/broccoli-debug-0.6.2.tgz#4c6e89459fc3de7d5d4fc7b77e57f46019f44db1"
dependencies:
broccoli-plugin "^1.2.1"
fs-tree-diff "^0.5.2"
heimdalljs "^0.2.1"
heimdalljs-logger "^0.1.7"
minimatch "^3.0.3"
symlink-or-copy "^1.1.8"
tree-sync "^1.2.2"

broccoli-filter@^1.2.2, broccoli-filter@^1.2.3:
version "1.2.4"
resolved "https://registry.yarnpkg.com/broccoli-filter/-/broccoli-filter-1.2.4.tgz#409afb94b9a3a6da9fac8134e91e205f40cc7330"
Expand Down Expand Up @@ -1145,6 +1157,25 @@ broccoli-stew@^1.2.0, broccoli-stew@^1.3.3:
rsvp "^3.0.16"
walk-sync "^0.3.0"

broccoli-stew@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/broccoli-stew/-/broccoli-stew-1.5.0.tgz#d7af8c18511dce510e49d308a62e5977f461883c"
dependencies:
broccoli-debug "^0.6.1"
broccoli-funnel "^1.0.1"
broccoli-merge-trees "^1.0.0"
broccoli-persistent-filter "^1.1.6"
broccoli-plugin "^1.3.0"
chalk "^1.1.3"
debug "^2.4.0"
ensure-posix-path "^1.0.1"
fs-extra "^2.0.0"
minimatch "^3.0.2"
resolve "^1.1.6"
rsvp "^3.0.16"
symlink-or-copy "^1.1.8"
walk-sync "^0.3.0"

broccoli-uglify-sourcemap@^1.0.0:
version "1.5.1"
resolved "https://registry.yarnpkg.com/broccoli-uglify-sourcemap/-/broccoli-uglify-sourcemap-1.5.1.tgz#9fd2e87f1c177b11a758e73c3a11d6a03d90d086"
Expand Down Expand Up @@ -1528,7 +1559,7 @@ debug@2.3.3:
dependencies:
ms "0.7.2"

debug@2.6.1, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0:
debug@2.6.1, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.4.0:
version "2.6.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351"
dependencies:
Expand Down Expand Up @@ -2415,6 +2446,12 @@ fast-sourcemap-concat@^1.0.1:
source-map "^0.4.2"
source-map-url "^0.3.0"

fastboot-transform@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/fastboot-transform/-/fastboot-transform-0.1.1.tgz#de55550d85644ec94cb11264c2ba883e3ea3b255"
dependencies:
broccoli-stew "^1.5.0"

faye-websocket@~0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4"
Expand Down Expand Up @@ -2531,7 +2568,7 @@ fs-exists-sync@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add"

fs-extra@2.0.0:
fs-extra@2.0.0, fs-extra@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.0.0.tgz#337352bded4a0b714f3eb84de8cea765e9d37600"
dependencies:
Expand Down Expand Up @@ -3546,7 +3583,7 @@ mime@1.3.4, mime@^1.2.11:
version "1.3.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"

"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2:
"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
dependencies:
Expand Down Expand Up @@ -4649,7 +4686,7 @@ to-fast-properties@^1.0.0, to-fast-properties@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"

tree-sync@^1.2.1:
tree-sync@^1.2.1, tree-sync@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/tree-sync/-/tree-sync-1.2.2.tgz#2cf76b8589f59ffedb58db5a3ac7cb013d0158b7"
dependencies:
Expand Down

0 comments on commit 9da72c7

Please sign in to comment.