generator-chisel
generator-chisel copied to clipboard
Rewrite with Webpack
Installation and Testing
# install
yarn global add generator-chisel@next
# or
npm -g install generator-chisel@next
# after installation global chisel command should be added
# go to empty directory and use it to create a project
chisel create
Documentation
Documentation of the new version.
List below is WiP
Existing Chisel Features
Ready
- [x] Hello message
- [x] Check for updates before creation
- [x] Warn when creating in existing project directory
- [X] JS/SCSS bundling with hot reload in dev mode (now all with webpack)
- [X] JS/SCSS linting (improved configs)
- [X] Postcss support (autoprefixer)
- [X] WP: reload on twig/php changes in template
- [X] Create separate non-minified bundles during build
- [X] WP Config during creation (also available when setting up existing project as
yarn chisel-scripts wp-config
) - [X] WP Plugins during creation
- [X] WP: asses copying (Note: refresh on new assets is buggy, make some change in JS/SCSS to trigger rebuild).
- [X] bundled WP CLI (
yarn wp
) - [x] Lint on git commit
- [x] Page generator (
yarn add-page
) - [x] Build report
- [x] Changelog generation (main one not tested)
In Progress
- [ ] don't delete me
To Do
On Hold
- [ ] jQuery
- [ ] vendor concatenated bundle
- [ ] placement of src dir
- [ ] front-end templates (and data injection)
New Features
Ready
- [X] All static assets are hashed/revisioned (works with
assetPath
in twig andurl('~assets/...')
in CSS and JS). - [X] React support with hot reload (babel and eslint), possible to enable in
chisel.config.js
(NOT Gutenberg integration). - [X] Automatic polyfills (disabled by default, can be enabled in
babel.config.js
). - [X] Inspect generated webpack config (
yarn chisel-scripts inspect
) - [X] Ask for supported browsers during generation
- [x] Hooks for modifying webpack config and other things
- [X] #460 - Add suport for inline SVG - assets can be inlined in (S)CSS with
url('~assets/images/something.svg?inline')
. SVGO should be automatically applied during minification (not verified). - [X] See dashboard: #452, #454, #459, #189, #446, #455, #464, #271
In Progress
- [ ] don't delete me
To Do
@jakub300 tested it on Windows and works nicely for me.
This is awesome news! Good job guys - Did you also take a look at Laravel mix? Going to try it out
@jakub300 I tried to generate project on Win10 and got error when database should be created: Error: Too many positional arguments: 1
Hi there I run into the following problems; After the Plug-in section (I've selected none) i got the Message;
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
> [email protected] install W:\SERVER\XAMPP\htdocs\test\xfive-project-wp\node_modules\fibers
> node build.js || nodejs build.js
"win32-x64-72" exists; testing
Binary is fine; exiting
> [email protected] install W:\SERVER\XAMPP\htdocs\test\xfive-project-wp\node_modules\husky
> node husky install
husky > Setting up git hooks
Cannot read property 'toString' of null
husky > Failed to install
After the Database Setup i got some errors like that:
Der Befehl "php" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
So the command php was not found. It copied all the files except for the Wordpress Installation. After that i installed WP and setup the Database and now it seams to work.
@marziolek @spy15 thank you for trying new Chisel and for the reports.
@jakub300 can you take a look at those issues when you have time? Thanks
What do you guys think about Laravel Mix ? I have already used it with other custom themes and found it very easy to setup and extend to my needs.
@marziolek
@jakub300 I tried to generate project on Win10 and got error when database should be created: Error: Too many positional arguments: 1
I also encountered this issue. Did you find a solution?
@marziolek
@jakub300 I tried to generate project on Win10 and got error when database should be created: Error: Too many positional arguments: 1
I also encountered this issue. Did you find a solution?
I didn't have that issue since last time. You should check your local setup, node version, mysql etc.
@anatter could you please check if you are not on npm v6 like described here https://github.com/xfiveco/generator-chisel/issues/495#issuecomment-974749414? Upgrading npm or using yarn should help. If not, let us know. Thanks