JavaScript Framework fairy support js
Build

distWork

build_prd, build_stg, build_dev, build_local are defined in package.json. It is the script that creates distWork from src.
When generating distWork from src, The environment given to fairysupport_js in package.json and envValue.json, envValue.{environment}.json under src/js/env are bundled in js under src/js/modules.
msg.json, msg.{language}.json under src/js/msg/ is merged from parent directory to child directory.
envValue.json, envValue.{environment}.json, view.html under src/js/components are bundled in controller.js under src/js/components
msg.json, msg.{language}.json under src/js/components is merged from parent directory to child directory.
app.css under src/css is merged from parent directory to child directory.
If you are using $frame in files under src/page, html under src/frame and file under src/page is merged.
If you are using $embed in files unser src/page, html under src/frame, html under src/embed, include html under src/embed.
If you are using $envValue in files unser src/js, src/page and src/css, $envValue is replaced by envValue.json, envValue.{environment}.json under src/env.
Merge app.css with src/page.
If you are using $img in files under src/js, src/page and src/css, $img is replaced by image file under src/img.
Generate fairysupport.min.js under distWork.
During the build, a file called fairy_support_js.lock will be created at the same level directory as package.json.
If fairy_support_js.lock remains after shutting down the PC or dropping the process during the build, delete fairy_support_js.lock and rebuild.
The fairysupport_js executed by build_prd, build_stg, build_dev, build_local defined in package.json can receive the location of src in the second argument and the location of distWork in the third argument.
That is, "build_local": "fairysupport_js local" is the same as "build_local": "fairysupport_js local ./ ./".
The distWork directory is deleted when the build is done. Please be careful.


dist

Move to the directory where package.json is located using the command line

npm run minify

As you can see in package.json, minify just runs grunt to compress the file and copy it from distWork to dist.
The settings are written in Gruntfile.js. You can use any compression tool.
The dist directory will be the final product.


Next page Web component

table of contents