1.0.5 • Published 3 years ago

shuup-static-build-tools v1.0.5

Weekly downloads
187
License
OSL-3.0
Repository
github
Last release
3 years ago

Shuup Static Build Tools

This lib provides utilities to build Shuup static sources using Parcel Bundler.

Installation

$ npm i --save shuup-static-build-tools

Usage

Create a Node.js script to build files, example build_resources.js:

const { getParcelBuildCommand, runBuildCommands } = require("shuup-static-build-tools");

runBuildCommands([
    getParcelBuildCommand({
        cacheDir: "myapp",
        outputDir: "static/myapp/",
        entryFile: "static_src/myapp.js"
    }),
    getParcelBuildCommand({
        cacheDir: "myapp",
        outputDir: "static/myapp/",
        entryFile: "static_src/myapp.less"
    })
]);

Add in your packages.json:

"scripts": {
    "watch": "node build_resources --watch",
    "build": "node build_resources"
},
"shuup": {
    "static_build": true
}

Now you can use Shuup static build tool to build your app alogn with all Shuup apps:

python setup.py build_resources

Note: make sure to follow Parcel Bundler steps to install all the required addsons for transforming your code correctly.

License

OSL-3.0

1.0.5

3 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago