Open NullVoxPopuli opened 6 years ago
concat-stats-for/3-vendor.css/addon-tree-output/
ember-cli-notifications/
- components/
- services/
- styles/
- templates/
ember-cli-notifications.css
Steps to reproduce?
this should do it:
git clone git@gitlab.com:NullVoxPopuli/emberclear.git
cd emberclear/packages/frontend
git checkout broccoli-concat-tests
yarn clean && yarn && yarn analyze
though, when I just ran this again, I got a different error / missing file:
$ yarn broccoli-concat-analyser ./concat-stats-for
$ /home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/.bin/broccoli-concat-analyser ./concat-stats-for
⠙ processing...{ Error: ENOENT: no such file or directory, open '/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/concat-stats-for/2-emberclear-fastboot.js/emberclear/initializers/ajax.js'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at fileNames.forEach (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/broccoli-concat-analyser/lib/summarize.js:31:63)
at Array.forEach (<anonymous>)
at Function.summarize (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/broccoli-concat-analyser/lib/summarize.js:31:13)
at process.<anonymous> (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/workerpool/lib/worker.js:76:27)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/concat-stats-for/2-emberclear-fastboot.js/emberclear/initializers/ajax.js' }
I've come up with this script in the mean time:
#!/bin/bash
R="\e[31m"
Y="\e[33m"
N="\e[0m"
yarn build:production:analyze
# => CONCAT_STATS=true yarn build:production
# => PREMBER=true EXPERIMENTAL_RENDER_MODE_SERIALIZE=true yarn build --environment production && sed -i -e 's/{{ROOT_URL}}/\//g' dist/index.html
# => yarn ember build --environment production
# => EMBER_CLI_BROCCOLI_2=true EMBER_CLI_SYSTEM_TEMP=true EMBER_CLI_MODULE_UNIFICATION=true node_modules/.bin/ember build --environment production
# rm files that do not have corresponding folders
for filename in ./concat-stats-for/*; do
extension=${filename: -5}
if [ $extension == ".json" ]; then
folderName="${filename//$extension/}"
if [ ! -d "$folderName" ]; then
echo -e "\n${Y}$folderName ${R} does not exist..."
echo -e "\tDeleting ${Y}$filename${N}\n"
rm $filename
fi
fi
done
# begin analysis
yarn bundle-analyze
# => yarn broccoli-concat-analyser ./concat-stats-for
# => node_modules/.bin/broccoli-concat-analyser ./concat-stats-for
# copy to public folder for deployment
cp ./concat-stats-for/index.html ./public/bundle.html
it seems that the extra json files that are generated aren't useful / are already included in vendor
@NullVoxPopuli is this still an issue?
Just testing out the updates: https://github.com/ember-cli/ember-cli/pull/8091
in package.json:
Got this error: