Package Exports
- generator-webpack-preact
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (generator-webpack-preact) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Generator Webpack Preact
This scaffold creates in seconds for you a professional envoirement to develop with a package of Webpack, TypeScript, Preact and Redux-Zero a application in HTML, SASS, TS(X) and JS(X).
- Development Server with Hot Module Replacement (HMR) ready.
- Configs was splited to development and production
- Plugins inside and ready to add more
- Install packages after scaffolding ready
- You can create more components and choose it in the scaffolding.
Install
You can download, open in your editor and start it directly.
Or create a Scaffold Templates folder and open your Terminal, to switch in the folder.
username$ cd /Users/username/scaffold/templates/
Clone the repo or download to the place, you want your templates.
templates$ git clone https://github.com/prod3v3loper/generator-webpack-preact.git /Users/username/scaffold/templates/
And now install all Dependencies in package.json for the generator
templates$ npm install
Usage
Now create your main Projects folder. This folder contains all projects that we then create.
Switch to the projects folder.
templates$ cd /Users/username/projects/
Start the scaffolding from our scaffold templates folder with the template generator-webpack-preact
projects$ webpack init /Users/username/scaffold/templates/generator-webpack-preact
And we become a promt ;)
? Customer name? (customer)
? Project year? (2019)
? Project name? (newsletter)
? Components you want to use? (type comma seperated) (counter)
? Want you install all dependencies? Y/n
After answer all questions start the create
create src/index.tsx
create src/scss/style.scss
create public/index.html
create package.json
create global.config.json
create tsconfig.dev.json
create tsconfig.pro.json
create src/components/counter/actions.js
create src/components/counter/counter.js
create src/components/counter/store.js
Congratulations! Your new webpack configuration file has been created!
The
npm
installation is currently not possible, since we run withwebpack init
, it did not create the webpack configs withyo
.
Build
Switch to the new project folder we have created.
projects$ cd /Users/username/projects/counter
This command start the Server with the hotmodule.
counter$ npm run build:dev
This command build the dist folder with the end product.
counter$ npm run build:release
Contribute
Please file an issue if you think something could be improved. Please submit Pull Requests when ever possible.
Authors
- Samet Tarim - All works - prod3v3loper