Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Do not use ember-cli-node-assets for imports (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner authored Sep 7, 2020
1 parent 2217809 commit c6ee3ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018
Copyright (c) 2020

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
23 changes: 7 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ module.exports = {
}

if (theme && theme !== 'none') {
this.theme = `themes/prism-${theme}.css`;
app.import(`node_modules/prismjs/themes/prism-${theme}.css`);
} else {
app.import(`node_modules/prismjs/themes/prism.css`);
}

app.import('node_modules/prismjs/prism.js');

if (components) {
components.forEach((component) => {
this.components.push(`components/prism-${component}.js`);
app.import(`node_modules/prismjs/components/prism-${component}.js`);
});
}

Expand All @@ -51,9 +55,8 @@ module.exports = {
const nodeAssetsPath = `plugins/${plugin}/prism-${plugin}.${fileExtension}`;
const file = `node_modules/prismjs/${nodeAssetsPath}`;


if (fs.existsSync(file)) {
this.plugins.push(nodeAssetsPath);
app.import(file);
}
});

Expand All @@ -64,18 +67,6 @@ module.exports = {
app.import('vendor/ember-prism.js');

this._super.included.apply(this, arguments);
},
options: {
nodeAssets: {
prismjs() {
return {
import: [
'prism.js',
this.theme
].concat(this.components, this.plugins)
};
}
}
}
};

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"@ember/render-modifiers": "^1.0.2",
"ember-cli-babel": "^7.19.0",
"ember-cli-htmlbars": "^5.1.1",
"ember-cli-node-assets": "^0.2.2",
"prismjs": "^1.19.0"
},
"devDependencies": {
Expand Down
18 changes: 3 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3307,7 +3307,7 @@ broccoli-kitchen-sink-helpers@^0.3.1:
glob "^5.0.10"
mkdirp "^0.5.1"

broccoli-merge-trees@^1.0.0, broccoli-merge-trees@^1.1.1:
broccoli-merge-trees@^1.0.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-1.2.4.tgz#a001519bb5067f06589d91afa2942445a2d0fdb5"
integrity sha1-oAFRm7UGfwZYnZGvopQkRaLQ/bU=
Expand Down Expand Up @@ -5046,18 +5046,6 @@ ember-cli-lodash-subset@^2.0.1:
resolved "https://registry.yarnpkg.com/ember-cli-lodash-subset/-/ember-cli-lodash-subset-2.0.1.tgz#20cb68a790fe0fde2488ddfd8efbb7df6fe766f2"
integrity sha1-IMtop5D+D94kiN39jvu332/nZvI=

ember-cli-node-assets@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/ember-cli-node-assets/-/ember-cli-node-assets-0.2.2.tgz#d2d55626e7cc6619f882d7fe55751f9266022708"
integrity sha1-0tVWJufMZhn4gtf+VXUfkmYCJwg=
dependencies:
broccoli-funnel "^1.0.1"
broccoli-merge-trees "^1.1.1"
broccoli-source "^1.1.0"
debug "^2.2.0"
lodash "^4.5.1"
resolve "^1.1.7"

ember-cli-normalize-entity-name@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/ember-cli-normalize-entity-name/-/ember-cli-normalize-entity-name-1.0.0.tgz#0b14f7bcbc599aa117b5fddc81e4fd03c4bad5b7"
Expand Down Expand Up @@ -8321,7 +8309,7 @@ lodash.uniqby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302"
integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=

lodash@4.17.20, lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.5.1, lodash@^4.6.1:
lodash@4.17.20, lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.6.1:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
Expand Down Expand Up @@ -10431,7 +10419,7 @@ resolve@1.9.0:
dependencies:
path-parse "^1.0.6"

resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.3.3, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.7.1, resolve@^1.8.1:
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.3.3, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.7.1, resolve@^1.8.1:
version "1.17.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444"
integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
Expand Down

0 comments on commit c6ee3ec

Please sign in to comment.