Comments (9)
@ahmadawais ok so it is definitively a strangeness related to my setup.
If i find a replicable reason i will let you know.
Thank you for the support!
from create-guten-block.
That's very kind of you to say! 💯
One of the best thing about create-guten-block is how opinionated it is. I am literally thinking of moving it all to Styled Components that's CSS in JS.
But I'll in to support of Stylus and Less, it's a decision, not options philosophy here, and I don't want to make it a tool that can have all the features as it will make things complex for end users.
Can you explain "Be able to add another JS file to compilation"?
Peace! ✌️
from create-guten-block.
Oh yeah great Idea. I'm just starting with Styled components but it's awesome. I really think in the long term it'll become a standard way of doing CSS in React. It's simple and clean.
For the "another JS" :
For now we have blocks.js compiling into blocks.build.js
But if I want another JS file to compile elsewhere (for other reasons) I'm not sure if I can do it.
For now I have Webpack for Gutenberg but I still keep Gulp to compile JS and CSS for the PHP Side wp the WP admin . May be in the future I'll be able to keep only Webpack (but I understand CGB is not about handling every custom need. For now my mix gulp + webpack is perfect and fits all my needs)
thanks !
from create-guten-block.
+1 for moving to styled-components.
from create-guten-block.
Oh I have a project that I am going to open source soon which has both Gulp and webpack support. Also, I am open to a PR related to styled-components.
from create-guten-block.
Hi guys, is it possible to add an npm package npm i package-name
without ejecting?
At the moment doing it will reset the package.json and node_modules folder loosing all CGB settings and scripts.
from create-guten-block.
@SineGrain just install it. Your package.json is yours to do whatever you want with it. Just keep cgb-scripts
and it's scripts
in there.
from create-guten-block.
@ahmadawais doing npx create-guten-block test-cgb-block-3
the installation script on my machine create the following package.json
{
"name": "test-cgb-block-3-cgb-guten-block",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "cgb-scripts start",
"build": "cgb-scripts build",
"eject": "cgb-scripts eject"
}
}
If you add a package leaving it as is (eg. npm i throttle-debounce
) npm will reset your node_modules folder.
To add modules i had to add manually cgb-scripts as dependency.
{
"name": "test-cgb-block-3-cgb-guten-block",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "cgb-scripts start",
"build": "cgb-scripts build",
"eject": "cgb-scripts eject"
},
"dependencies": {
"cgb-scripts": "^1.9.8"
}
}
node v8.12.0
npm v6.4.1
from create-guten-block.
@SineGrain I just ran npx create-guten-block tstblck
to test it and the block that got created had this package.json file.
{
"name": "tstblck-cgb-guten-block",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "cgb-scripts start",
"build": "cgb-scripts build",
"eject": "cgb-scripts eject"
},
"dependencies": {
"cgb-scripts": "1.9.8"
}
}
The dependency of cgb-scripts
is there.
I then ran npm i throttle-debounce
and now the package.json
is
{
"name": "tstblck-cgb-guten-block",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "cgb-scripts start",
"build": "cgb-scripts build",
"eject": "cgb-scripts eject"
},
"dependencies": {
"cgb-scripts": "1.9.8",
"throttle-debounce": "^2.0.1"
}
}
from create-guten-block.
Related Issues (20)
- need css module support.
- Start works, but Build Fails HOT 3
- The externals list is outdated and doesn't support all the available Gutenberg components. HOT 2
- found 2 low severity vulnerabilities HOT 1
- Missing @wordpress/server-side-render dependency HOT 3
- Eject command HOT 1
- Cannot find module '/root/.npm/_npx/87162/lib/node_modules/create-guten-block/node_modules/@scarf/scarf/report.js' HOT 1
- common.scss file gets re-compiled/added multiple times with each successive block HOT 3
- How can you add multiple blocks to the same project? HOT 1
- Command failed: npm install cgb-scripts --save --save-exact --silent HOT 11
- Consider officially deprecating CGB HOT 7
- Do you have any examples of using render block
- Is it already possible to include a register_block_patterns() within this package?
- Having trouble getting started with multi-block HOT 1
- How to package our plugin
- Block.json is missing. Block styles will not load in future WordPress releases
- Module parse failed: Unexpected token while compiling block
- Only a package.json and a .gitignore file after running the npx command HOT 3
- blockNamePHPLower causes issue when its running as a function n ame
- create-guten-block is looking for active maintianers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-guten-block.