@aquestsrl/create-app-cli v1.12.6
@aquestsrl/create-app-cli
This package provides a cli interface for develop Universal Node application with no build configuration.
The goal is to keep configuration files separate from development files.
Features
- HMR Server and Client side
- HMR Style with css-hot-loader
- Custom Webpack logger
- Completely configurable and extensible
- Framework agnostic
Installation
Install package globally (it is assumed you are logged in NPM)
npm install @aquestsrl/create-app-cli -g
// or
yarn global add @aquestsrl/create-app-cliIf you receive a permission error, check your ~/.npmrc:
@aquestsrl:registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=YOUR_TOKENCreate new app
If you have previously installed a starter kit, navigate to an empty folder and type this command to launch configuration wizard:
create-appAnswer to this questions:
Select your default npm client
Project name
Project description
Select a starter-kitThat's all!
Read here how to write your boilerplate.
Development
Type this command to launch dev server:
create-app devBuild
Type this command to build your application:
create-app buildIf you have more than one production configuration on your create-app.config.json, use --env option:
create-app build --env production-localAvailable options
Show usage guide
create-app -hShow package version
create-app -vUse a configuration from create-app.config.json
create-app build --env production-localExtends Webpack configuration
Create create-app.webpack-config.js on your project root for extends the default configuration.
webpack-merge will be used to merge objects.
This module receive an object with this arguments:
| Name | Type | Description |
|---|---|---|
| NODE_ENV | String | Current process.env.NODE_ENV value |
| SERVER | Boolean | Determine if is a server configuration |
Example:
module.exports = ({ NODE_ENV, SERVER }) => {
if (!SERVER) {
return {
module: {
rules: [
{
test: /\.(frag|vert)$/,
loaders: [
'raw-loader',
'glslify-loader',
],
},
],
},
};
}
};Extends Loaders configuration
Create create-app.loaders-config.js on your project root for extends the default loaders configuration.
webpack-merge will be used to merge objects.
This module receive an object with this arguments:
| Name | Type | Description |
|---|---|---|
| NODE_ENV | String | Current process.env.NODE_ENV value |
| SERVER | Boolean | Determine if is a server configuration |
Example:
module.exports = () => ({
scss: {
data: `
@import 'variables';
@import 'utilities/_flexbox';
`,
},
js: { presets: [require('@babel/preset-react').default] },
});6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago