The shell script in this gist reads a json file - pages.json
- which specifies pages structure of an existing web project, as multiple modules each of which includes several pages.
Each page specifies what vue components it uses, if the filename
of a component ends with .js
or .vue
then it's considered a simple single file component, otherwise it would represent a complex component - which includes multiple components within -, in other words components whose filenames don't end with those extensions will be loaded from resources/components/{component name}
directory, while single file components will be loaded as files from resources/components/{component name}.vue
file.
The script expects the outputDir
or vue's build directory to be set to resources/lib
, as it will copy the minified build output from there to resources/bundles/{module name}/{page name}.js
for each page specified in the pages.json
file then, you can include those javascript files