ahmadawais / create-guten-block Goto Github PK
View Code? Open in Web Editor NEWπ¦ A zero-configuration #0CJS developer toolkit for building WordPress Gutenberg block plugins.
Home Page: https://Awais.dev/cgb-post
License: MIT License
π¦ A zero-configuration #0CJS developer toolkit for building WordPress Gutenberg block plugins.
Home Page: https://Awais.dev/cgb-post
License: MIT License
Using code from Gutenberg core blocks I get an import error:
/**
* WordPress dependencies
*/
import { __, sprintf } from '@wordpress/i18n';
import { PanelBody, RangeControl } from '@wordpress/components';
import { Fragment } from '@wordpress/element';
import {
InspectorControls,
InnerBlocks,
} from '@wordpress/blocks';
Uncaught Error: Cannot find module "@wordpress/i18n"
How can I use these dependencies (from @wordpress
)?
Do I have to install a package first? Configure webpack differently?
(Issue originally created in deprecated repository, see ahmadawais/Gutenberg-Boilerplate#23 (comment))
Hi !
Great work !
A few ideas to avoid ejecting the whole project :
I love how it's easy to start with your configuration. But I'm not a WebPack expert.
I know how to update a config with Gulp or Brunch, bat that's it.
As JS in WP is kind of a "new" thing. I think former PHP dev will seek the simplicity you provide :)
Cheers
Was just working on a test block and I've found that I needed to install the classnames (not supported by default).
I guess that won't be always needed but since different states of a block could be represented with different classes, it might be useful to have it in?
Package: https://www.npmjs.com/package/classnames
It's not a problem to install it by hand of course but if most people find it a good thing to have, it might be considered to be included in a near future?
This is in the production build configuration:
devtool: 'cheap-eval-source-map'
and produces eval'ed code in the built JS files.
This is okay with development, but should not be present in the production builds.
No, feature request.
Are we going to include classnames library so people can have multiple classes in their blocks? https://github.com/JedWatson/classnames
I want to import core components from Gutenberg like Fragment
or InnerBlocks
.
The Gutenblock should be able to hold other blocks (nestable), I am trying to use the code of Columns block for allowing this: https://github.com/WordPress/gutenberg/blob/master/core-blocks/columns/index.js.
import { PanelBody, RangeControl } from '@wordpress/components';
However, the import fails as @wordpress
is imported and cannot be found (Uncaught Error: Cannot find module "@wordpress/i18n"
). Do I have to use a different name for importing from @wordpress
?
This is not a bug in create-guten-block
, I am probably just importing incorrectly.
Tried the installation with a [path to the plugin], The package.json is taking up the entire path as the name of the package and appends it with '-cgb-guten-block' in v 1.9.2.
on mac terminal
node -v8.6.0
npm -v5.3.0
npm ls cgb-scripts
/Users/rajamohammed/Sites/wp-test/wp-content/plugins/my-gt-blocks
βββ [email protected]
npm ERR! error in /Users/rajamohammed/Sites/wp-test/wp-content/plugins/my-gt-blocks: Invalid name: "./wp-content/plugins/my-gt-blocks-cgb-guten-block"
changing the name in package.json resolved my issue.
Is your feature request related to a problem? Please describe.
Since both the block and content alignments have become "standard" for many of the native blocks, it would be nice if the original template of the create-guten-block initial build would include the toolbars, along with the current elements created.
Right now it is pretty easy to create many blocks with the current template, but I found adding the alighment toolbars quite difficult to figure out.
mac OS
node: v10.0.0
npm: v5.6.0
I run the script for the first time after i updated npm and node. Then i get these Error i dont understand.
π¦ Creating a WP Gutenberg Block plugin called: criocoblocks-map
In the directory: /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map
This might take a couple of minutes.
β 1. Creating the plugin directory called β criocoblocks-map
β ¦ 2. Installing npm packages.../Users/christian/.npm/_npx/2206/lib/node_modules/create-guten-block/index.js:60
throw err;
^
Error: Command failed: npm install cgb-scripts --save --save-exact --slient
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.2/fse-v1.2.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/darwin-x64-64_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
gyp info it worked if it ends with ok
gyp verb cli [ '/Users/christian/.nvm/versions/node/v10.0.0/bin/node',
gyp verb cli '/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /Applications/MAMP/Library/bin/python2
gyp verb check python version `/Applications/MAMP/Library/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.13\n"
gyp verb get node dir no --target version specified, falling back to host node version: 10.0.0
gyp verb command install [ '10.0.0' ]
gyp verb install input version string "10.0.0"
gyp verb install installing version: 10.0.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.0.0
gyp verb build dir attempting to create "build" dir: /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /Applications/MAMP/Library/bin/python2
gyp info spawn args [ '/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/christian/.node-gyp/10.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/christian/.node-gyp/10.0.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/christian/.node-gyp/10.0.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /Users/christian/.node-gyp/10.0.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
../src/libsass/src/cencode.c:50:5: warning: declaration does not declare anything [-Wmissing-declarations]
__attribute__ ((fallthrough));
^
../src/libsass/src/cencode.c:64:5: warning: declaration does not declare anything [-Wmissing-declarations]
__attribute__ ((fallthrough));
^
2 warnings generated.
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [Release/sass.a] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/Users/christian/.nvm/versions/node/v10.0.0/bin/node" "/Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/christian/.npm/_logs/2018-04-25T06_07_36_919Z-debug.log
> [email protected] install /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/fsevents
> node install
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
COPY /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp
> [email protected] install /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/darwin-x64-64_binding.node
> [email protected] postinstall /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> [email protected] postinstall /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-sass
> node scripts/build.js
Building: /Users/christian/.nvm/versions/node/v10.0.0/bin/node /Users/christian/Sites/vue-starter/wp-content/plugins/criocoblocks-map/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o ../src/libsass/src/ast_fwd_decl.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/backtrace.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/backtrace.o ../src/libsass/src/backtrace.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/base64vlq.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/base64vlq.o ../src/libsass/src/base64vlq.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/bind.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/bind.o ../src/libsass/src/bind.cpp
cc '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/cencode.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/cencode.o ../src/libsass/src/cencode.c
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/check_nesting.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/check_nesting.o ../src/libsass/src/check_nesting.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/color_maps.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/color_maps.o ../src/libsass/src/color_maps.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/constants.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/constants.o ../src/libsass/src/constants.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/context.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/context.o ../src/libsass/src/context.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/cssize.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/cssize.o ../src/libsass/src/cssize.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/emitter.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/emitter.o ../src/libsass/src/emitter.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/environment.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/environment.o ../src/libsass/src/environment.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/error_handling.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/error_handling.o ../src/libsass/src/error_handling.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/eval.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/eval.o ../src/libsass/src/eval.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/expand.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/expand.o ../src/libsass/src/expand.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/extend.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/extend.o ../src/libsass/src/extend.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/file.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/file.o ../src/libsass/src/file.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/functions.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/functions.o ../src/libsass/src/functions.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/inspect.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/inspect.o ../src/libsass/src/inspect.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/json.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/json.o ../src/libsass/src/json.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/lexer.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/lexer.o ../src/libsass/src/lexer.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/listize.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/listize.o ../src/libsass/src/listize.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/memory/SharedPtr.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/memory/SharedPtr.o ../src/libsass/src/memory/SharedPtr.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/node.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/node.o ../src/libsass/src/node.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/operators.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/operators.o ../src/libsass/src/operators.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/output.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/output.o ../src/libsass/src/output.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/parser.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/parser.o ../src/libsass/src/parser.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/plugins.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/plugins.o ../src/libsass/src/plugins.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/position.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/position.o ../src/libsass/src/position.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/prelexer.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/prelexer.o ../src/libsass/src/prelexer.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/remove_placeholders.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/remove_placeholders.o ../src/libsass/src/remove_placeholders.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/sass.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/sass.o ../src/libsass/src/sass.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/sass2scss.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/sass2scss.o ../src/libsass/src/sass2scss.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/sass_context.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/sass_context.o ../src/libsass/src/sass_context.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/sass_functions.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/sass_functions.o ../src/libsass/src/sass_functions.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/sass_util.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/sass_util.o ../src/libsass/src/sass_util.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/sass_values.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/sass_values.o ../src/libsass/src/sass_values.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/source_map.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/source_map.o ../src/libsass/src/source_map.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/subset_map.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/subset_map.o ../src/libsass/src/subset_map.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/to_c.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/to_c.o ../src/libsass/src/to_c.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/to_value.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/to_value.o ../src/libsass/src/to_value.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/units.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/units.o ../src/libsass/src/units.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/utf8_string.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/utf8_string.o ../src/libsass/src/utf8_string.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/util.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/util.o ../src/libsass/src/util.cpp
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.2"' -I/Users/christian/.node-gyp/10.0.0/include/node -I/Users/christian/.node-gyp/10.0.0/src -I/Users/christian/.node-gyp/10.0.0/deps/uv/include -I/Users/christian/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/values.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/values.o ../src/libsass/src/values.cpp
rm -f Release/sass.a && ./gyp-mac-tool filter-libtool libtool -static -o Release/sass.a Release/obj.target/libsass/src/libsass/src/ast.o Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o Release/obj.target/libsass/src/libsass/src/backtrace.o Release/obj.target/libsass/src/libsass/src/base64vlq.o Release/obj.target/libsass/src/libsass/src/bind.o Release/obj.target/libsass/src/libsass/src/cencode.o Release/obj.target/libsass/src/libsass/src/check_nesting.o Release/obj.target/libsass/src/libsass/src/color_maps.o Release/obj.target/libsass/src/libsass/src/constants.o Release/obj.target/libsass/src/libsass/src/context.o Release/obj.target/libsass/src/libsass/src/cssize.o Release/obj.target/libsass/src/libsass/src/emitter.o Release/obj.target/libsass/src/libsass/src/environment.o Release/obj.target/libsass/src/libsass/src/error_handling.o Release/obj.target/libsass/src/libsass/src/eval.o Release/obj.target/libsass/src/libsass/src/expand.o Release/obj.target/libsass/src/libsass/src/extend.o Release/obj.target/libsass/src/libsass/src/file.o Release/obj.target/libsass/src/libsass/src/functions.o Release/obj.target/libsass/src/libsass/src/inspect.o Release/obj.target/libsass/src/libsass/src/json.o Release/obj.target/libsass/src/libsass/src/lexer.o Release/obj.target/libsass/src/libsass/src/listize.o Release/obj.target/libsass/src/libsass/src/memory/SharedPtr.o Release/obj.target/libsass/src/libsass/src/node.o Release/obj.target/libsass/src/libsass/src/operators.o Release/obj.target/libsass/src/libsass/src/output.o Release/obj.target/libsass/src/libsass/src/parser.o Release/obj.target/libsass/src/libsass/src/plugins.o Release/obj.target/libsass/src/libsass/src/position.o Release/obj.target/libsass/src/libsass/src/prelexer.o Release/obj.target/libsass/src/libsass/src/remove_placeholders.o Release/obj.target/libsass/src/libsass/src/sass.o Release/obj.target/libsass/src/libsass/src/sass2scss.o Release/obj.target/libsass/src/libsass/src/sass_context.o Release/obj.target/libsass/src/libsass/src/sass_functions.o Release/obj.target/libsass/src/libsass/src/sass_util.o Release/obj.target/libsass/src/libsass/src/sass_values.o Release/obj.target/libsass/src/libsass/src/source_map.o Release/obj.target/libsass/src/libsass/src/subset_map.o Release/obj.target/libsass/src/libsass/src/to_c.o Release/obj.target/libsass/src/libsass/src/to_value.o Release/obj.target/libsass/src/libsass/src/units.o Release/obj.target/libsass/src/libsass/src/utf8_string.o Release/obj.target/libsass/src/libsass/src/util.o Release/obj.target/libsass/src/libsass/src/values.o
at makeError (/Users/christian/.npm/_npx/2206/lib/node_modules/create-guten-block/node_modules/execa/index.js:169:9)
at Promise.all.then.arr (/Users/christian/.npm/_npx/2206/lib/node_modules/create-guten-block/node_modules/execa/index.js:274:16)
at process._tickCallback (internal/process/next_tick.js:178:7)
Just used this tool for the first time (great utility by the way!). Here's a couple of suggestions to make it more 'user friendly'.
When installing create-guten-block
for the first time it would be nice to run a series of questions for user input that will be used to create a config file (author, plugin URI, version). The idea is that every time a new plugin is created with create-guten-block
these settings will be used to create the plugin header. These questions could also be asked when creating a new plugin and if you just press enter then the value in the config file will be used. Also, some way of updating/editing the config file would be helpful.
Make the plugin name be the name of the project when the create-guten-block
command is executed. This would save time having to edit the plugin name. i.e. Entering this create-guten-block my-custom-block-plugin
would create a plugin with the following entry in the plugin header:
/**
* Plugin Name: My Custom Block Plugin
...
*/
i.e. Hyphens/underscore characters are removed and each word is then capitalized.
Hey, folks!
The create-guten-block repo is currently trending in JavaScript category on the weekly filter. With trending developers @ahmadawais @MaedahBatool @asharirfan @JulienMelissas @tfrommen β thanks for all the contributions. Multiply it by ten folks π
Currently props.className
is undefined in the save
function so className={ props.className }
should probably be removed until it is supported.
Read what's π¦ new, π improved, π fixed, and if π docs got updated β in the latest version.
π Read how to update to the latest version!
1.9.6
npx
(#13) Props @ntwb 27a50ebcreate-guten-block
8b694191.9.5
1.9.4
1.9.3
1.9.2
1.9.1
The first public release of create-guten-block
.
create-guten-block
command line tool.create-guten-block --help
(-h) β to show help.create-guten-block --debug
(-d) β to show debug environment info.npm start
β For development.npm run build
β For production build.npm run eject
β To customize, update, and maintain all by yourself.create-guten-block
dependency on cgb-scripts
.1.0.0
- 1.9.0
Version 1.0.0 was where it all began. From there the project was in beta till v1.9.0 came out. Which is why we've ignore the Changelog for these versions.
Reporting the test environment for the package:
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.0
Yarn: 0.24.6
npm: 5.6.0
Watchman: Not Found
Xcode: Not Found
Android Studio: Not Found
The package seems to be working. Although I had to use npx
to use it, so this should be noted as a possible troubleshoot.
Great work π―
When viewing the source on /wp-admin/post-new.php
, I expected the script tag for dist/blocks.build.js
to appear in the footer.
I also expected the script to have a URL parameter of ?ver=4.9.6
(since I'm running WordPress core 4.9.6).
The following line appeared in the <head>
of /wp-admin/post-new.php
with ?ver=1
<script type='text/javascript' src='http://gutenberg.test/wp-content/plugins/my-gblock/dist/blocks.build.js?ver=1'></script>
From wp-content/plugins/
, generate a block by running $ create-guten-block my-gblock
from the command line
Change to the new plugin directory $ cd my-gblock
Activate the plugin ($ wp plugin activate my-gblock
)
Run $ npm start
Log into the WordPress site and click Posts > Add New
View the page source
node -v
: v8.11.2
npm -v
: 5.6.0
yarn --version
(if you use Yarn): N/A
npm ls cgb-scripts
(if you havenβt ejected):
[email protected] /Users/sal/localsites/gutenberg/app/public/wp-content/plugins/my-gblock
βββ [email protected]
Then, specify:
Possible Solution
Add an empty string (''
) as the version number for wp_enqueue_script()
in src/init.php
Currently, the version number is commented out
// filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime β Gets file modification time.
which results in the next parameter, true // Enqueue the script in the footer.
being used as the version number, rather than the footer parameter.
Changing the line to
'', // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime β Gets file modification time.
results in
<script type='text/javascript' src='http://gutenberg.test/wp-content/plugins/my-gblock/dist/blocks.build.js?ver=4.9.6'></script>
appearing in the footer of the page.
Note: This also appears to have come up in the conversation on PR 52.
https://github.com/salcode/create-guten-block-js-head-bug-report
This is similar to some of #37 so apologies but I thought it would be easier to create a new one for this specific request.
I've been creating a block with some JS on the front-end and to achieve this I've ejected. I think it would be nice if there was something for both front and back provided like there is for the styles, is this something you'd consider for a future version? This is the only reason I can think of for ejecting right now.
I added .editor to the original JS filenames for backend and then added new ones with the original filenames.
Awesome toolkit btw π
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I have an issue when [...]
The terminal running the build and compile is often hidden behind another editor. I get so used to successful changes, I sometimes don't notice that the compile fails. I would be great if the terminal would issue an alert (beep) when the compile fails.
I use macOS, but I think most terminal windows can emit an alert. This would greatly enhance the tool.
By the way, I doubt you have many users at the moment, but once Gutenberg gets really going, I must say, I love your app. I really don't know React/JSX yet, but the startup creation of the project makes it pretty easy to figure out the basics!
I have been using the Create Guten Block and it's awesome, thanks!
I went to try and update some of the CSS but the .scss files are not compiling into the .css files inside the build folder. I am not sure if I need to be running SASS, or install something else to get it working correctly?
Any help would be much appreciated!
node -v
: v9.7.1npm -v
: 5.6.0Then, specify:
When running the command npm run build the .scss files would compile into .css files.
The .css files still contain old CSS and not the updated CSS from the .scss files.
Any chance to add react-svg-loader to allow loading custom svg icons for blocks?
Let's talk a little about how and if we are going to add a command that creates a new block inside of a previously created #GutenBlock via create-guten-block
.
create-guten-block
create-guten-block my-block
Now after working with this block for a while, you think, hey I think I need to create a new block inside this same single WordPress plugin. How do I do that?
create-guten-block
GitHub repo.03-multi-block
exampleAnd then you study or try to recreate a new block via looking at these steps
./src/
and copy paste the ./src/block
directory as ./src/block2/
where our second block's code will live../src/blocks.js
and import our new block from ./src/block2/block.js
file../block2/
directory and rename our block from multi-block
to multi-block-2
in both .js
and .scss
files../src/blocks.js
files as that's the file which gets imported into our webpack config.This as you can see is less than desireable
Well, that's what we are here to discuss.
β
IDEAL CASE
In an ideal world, we should be able to do this:
npm run create-block my-new-block
my-new-block
inside the `./src/my-new-block folder./src/blocks.js
files so that our webpack config could compile and build that new block along with the one we had before (yes, we haven't forgotten you my-block
π)π€ REAL WORLD PROBLEMS
The problems in implementing this approach are
npm
scripts can't receive terminal arguments that waynpm run create-block -- --name='my-new-block'
So, that's where I am right now and would love any suggestions you have for me.
Before you go and suggest that we add this inside the create-guten-block
CLI β well, that's never going to happen. Why? Two reasons!
create-guten-block
CLI to always be delegating all tasks to cgb-scripts
β so that users don't have update the global CLI all the time.path
would be hard for if the user runs the command in the wrong folder. As compared to cgb-scripts
that will always reside in the root path and then ./node_modules/cgb-scripts
and that's where our code for creating new block should be.π£ Floor is open to your suggestions now!
I know you have an npm version too, but if someone wants to use the npx option, I think it will be good to mention the requirements (npm & node required versions).
Sorry for not labeling, could't find this option
Is your feature request related to a problem? Please describe.
When I created a Git repo for my first block, the files from ./node_modules
where included when I ran $ git add .
In my experience, ./node_modules
is generally excluded from project repos.
Describe the solution you'd like
I would like to see a default .gitingore
file included when a block plugin is generated. Specifically, I would like to see node_modules
list in this new file.
I don't see a downside to this change.
Describe alternatives you've considered
I've also considered excluding the ./dist
folder. Personally, on my projects I prefer to exclude folders like this (that contain generated code).
However, this would have the downside that if someone cloned the repository, the plugin would not work until after they ran npm
. I still think it would make sense to add the ./dist
folder but I can see why one might choose not to.
Teachability, Documentation, Adoption, Migration Strategy
I don't see any of this as necessary for excluding ./node_modules
.
If it is decided to exclude ./dist
, it would be helpful to include documentation in the generated README.md
that indicates the plugin will not work unless npm start
or npm run build
is executed first.
Hi,
I just tried this plugin, but sometimes it fails, sometimes it fails with errors, and it create two folders, one with name I given, and other nammed -p
Thanks
It would be great to import components from WordPress with @WP alias, like @youknowriad does here: https://github.com/youknowriad/gcf/blob/master/scripts/blocks/components/field/index.js#L2
Relevant lines in his webpack:
https://github.com/youknowriad/gcf/blob/master/webpack.config.js#L41-L46
I want to create multiple blocks with "create-guten-block ". Is right approach to code for multiple blocks write in single file "src/block/block.js". Here the best thing found π eslint configuration which not ship with other one environment.
Hi and thanks for this awesome project π
like the title said, i wanna know how to add frontend js for each block.
blockname/ index.js
blockname/ frontend.js
Thanks a lot
Hey! We are buliding a site with Wordpress and Gutenberg, and this project has been a huge time saver for us.
The site we are building is based of the Bedrock template (https://roots.io/bedrock/) which you may or may not be familiar with. If you're not, the website explains the basic folder structure. So, for building our theme css/js, we are keeping a package.json at the root of the project, and the source files for our css/js is located in a folder, src/
at the root of the project. What this does, is that it keeps the source files from becoming publicly available, because the web/
folder is the document root. What I would like to do is also include create-guten-block in the main package.json, and have the input set to a folder in my src/
folder and output set to the plugin path.
I apologize if that didn't make much sense. My main point is that I think it would be great if we could be able to change the entry and output paths for the create-guten-block command, without having to eject the whole project. Maybe this could be an option passed to the cgb-scripts command?
I've checked my eslint, uninstalled and reinstalled it but whenever I create a new block I get this.
Missing JSDoc @returns for function. (valid-jsdoc)
No
I propose the commented-out lines in init.php
for versioning assets be updated to reference the assets in the /dist/
directory that are being enqueued, rather than referencing example editor.css
, block.js
and editor.css
files that don't exist in create-guten-block
projects, as they currently do.
With this change, users would be able to simply un-comment the filemtime()
lines to begin versioning their assets right away based on their last modified time with no further changes to the file path or filename needed.
Could you please add support for React and ReactDOM as externals? I am using
externals: { βreactβ: βReactβ, βreact-domβ: βReactDOMβ, },
in module.exports = { β¦ } of webpack.config.dev/prod.js .
It would be great if that setting could be part of the default so that it survives updates (without ejecting).
(Refering to https://www.cssigniter.com/how-to-use-external-react-components-in-your-gutenberg-blocks/)
Hey, I'm curious how to customize the webpack config to support importing images.
For example:
import myImage from'./image.png';
class MyBlockEditView extends Component {
render() {
return <img src={myImage} />;
}
}
Leads to this error in the console:
1141:1 Uncaught Error: Module parse failed: Unexpected character 'οΏ½' (1:0)
You may need an appropriate loader to handle this file type.
π Today, I am super excited to release the first public version of create-guten-block
.
π I wrote a 3,000 words blog post about it β https://awais.dev/cgb-post
Yes, that's not all done, yet. I have managed to change the codebase and release many updates by now, before actually announcing a stable release. The next step is to get this toolkit tested and mature the entire app to release version 2.0.0 for that not only do I need your support, I ask that you hop on board and contribute β that's the only way forward.
Goals listed below β without any order of priority:
create-guten-block
cgb-dev-utils
β separation of concernscgb-scripts
examples
Peace! βοΈ
No
node -v
: 9.2.0npm -v
: 5.5.1yarn --version
(if you use Yarn): NAnpm ls cgb-scripts
(if you havenβt ejected): NAThen, specify:
I tested the latest version on windows 8.1, following are my tests and results:
npm install create-guten-block --global
create-guten-block b3
β gives an error Directory already exists
but works perfectly fine.A subdirectory or file -p already exists.
Error occurred while processing: -p.
npm run start
β compiles successfully, and watches for the changes.<
in <p>
tags, gave error:npm run build
β successfully produce production buildsCSS and Block Content Changes
β Changed colors & block content from b3
to by Saqib
successfully works on local installation.npm run eject
β works successfully. Then I run npm run start
and it repeated same tests - works fine.npm run build
β success!All fine from my end. So π
No
OS: macOS Sierra 10.12.6
CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Node: 9.3.0
Yarn: Not Found
npm: 5.6.0
Watchman: Not Found
Chrome: 63.0.3239.132
Chrome Canary: Not Found
Firefox: 57.0.4
Firefox Developer Edition: Not Found
Firefox Nightly: Not Found
Safari: 11.0.2
Safari Technology Preview: Not Found
cgb-scripts: 1.9.1 => 1.9.1
I have tested the latest version on macOS Sierra 10.12.6 and here are my tests and their conclusions:
npm install create-guten-block --global
test-block
using command create-guten-block test-block
and everything went fine. Terminal Screenshot:test-block
and run npm start
in the terminal β this command watch for changes in the source code present in the test-block
directory.test-block/block/block.js
, in stylesheets editor.scss
β Editor styles β and style.scss
β Front-end styles.Resulted in errors in terminal:
Made a complementary GIF for my test block:
That's all π
Get more new GB blocks into the public's eye.
This really isn't a feature request or anything, but I'm working on a block add-on plugin, and just finished what I think is a very nice block. Really comes close to some page builder features.
I did manage to get a lot of exercising GB in the process, and found a few bugs, but I think GB is noticeably more stable than when I started on my projects a few months ago.
But, do have a look at this demo:
All-in-One Image/Text Gutenberg Block
Describe the solution you'd like
Thanks for looking. Sorry to go a bit off topic, but I think as more folks contribute good new blocks, people will be able to understand what Gutenberg is all about.
Yes
node -v
: 9.2.0npm -v
: 5.5.1yarn --version
(if you use Yarn): NAnpm ls cgb-scripts
(if you havenβt ejected): not sure about this one. In plugins directory, it gives `-- (empty)Then, specify:
npm install create-guten-block --global
create-guten-block my-block
It should create plugin my-block
Throw error:
$ create-guten-block beta-test-block
π¦ Creating a WP Gutenberg Block plguin called: beta-test-block
In the directory: C:\Users\Saqib Ameen\Documents\Websites\www.wpcouplelabs.dev\ wp-content\plugins/beta-test-block
This might take a couple of minutes.
C:\Users\Saqib Ameen\AppData\Roaming\npm\node_modules\create-guten-block\index.j s:60
throw err;
^
TypeError: this.stream.clearLine is not a function
at Ora.clear (C:\Users\Saqib Ameen\AppData\Roaming\npm\node_modules\create-g uten-block\node_modules\ora\index.js:53:15)
at Ora.render (C:\Users\Saqib Ameen\AppData\Roaming\npm\node_modules\create- guten-block\node_modules\ora\index.js:59:8)
at Ora.start (C:\Users\Saqib Ameen\AppData\Roaming\npm\node_modules\create-g uten-block\node_modules\ora\index.js:74:8)
at module.exports (C:\Users\Saqib Ameen\AppData\Roaming\npm\node_modules\cre ate-guten-block\app\run.js:41:10)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:684:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
NA
I'm sure I'm doing something wrong but I've been unable to determine what.
In my attempt to create a PR for #65, I've modified packages/cgb-scripts/template/src/init.php
however when I run yarn create-guten-block demo-block
, my change is not reflected in the demo block that is output.
The branch I'm working on to create the PR is sf/js-ver-number-65 on salcode/create-guten-block
.
I've tried to follow CONTRIBUTING.md
, multiple times but I've been unsuccessful.
Below is a summary of the commands I've run. Any help in getting me on the right path would be greatly appreciated.
sal@salcode:~$ git clone https://github.com/ahmadawais/create-guten-block/
Cloning into 'create-guten-block'...
remote: Counting objects: 2073, done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 2073 (delta 15), reused 27 (delta 6), pack-reused 2032
Receiving objects: 100% (2073/2073), 610.21 KiB | 2.11 MiB/s, done.
Resolving deltas: 100% (1269/1269), done.
sal@salcode:~$ cd create-guten-block/
sal@salcode:~/create-guten-block (master)$ yarn
yarn install v1.7.0
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
[4/4] π Building fresh packages...
β¨ Done in 26.30s.
sal@salcode:~/create-guten-block (master)$ nvim packages/cgb-scripts/template/src/init.php
sal@salcode:~/create-guten-block (master *)$ git checkout -b sf/js-ver-number-65
M packages/cgb-scripts/template/src/init.php
Switched to a new branch 'sf/js-ver-number-65'
sal@salcode:~/create-guten-block (sf/js-ver-number-65 *)$ git diff
diff --git a/packages/cgb-scripts/template/src/init.php b/packages/cgb-scripts/template/src/init.php
index 3edb775..a74e3d6 100644
--- a/packages/cgb-scripts/template/src/init.php
+++ b/packages/cgb-scripts/template/src/init.php
@@ -48,7 +48,7 @@ function <% blockNamePHPLower %>_cgb_editor_assets() {
'<% blockNamePHPLower %>-cgb-block-js', // Handle.
plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack.
array( 'wp-blocks', 'wp-i18n', 'wp-element' ), // Dependencies, defined above.
- // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime β Gets file modification time.
+ '', // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime β Gets file modification time.
true // Enqueue the script in the footer.
);
sal@salcode:~/create-guten-block (sf/js-ver-number-65 *)$ git add .
sal@salcode:~/create-guten-block (sf/js-ver-number-65 +)$ git commit -m 'Modify init.php template'
[sf/js-ver-number-65 c4e6f8e] Modify init.php template
1 file changed, 1 insertion(+), 1 deletion(-)
sal@salcode:~/create-guten-block (sf/js-ver-number-65)$ yarn create-guten-block demo-block
sal@salcode:~/create-guten-block (sf/js-ver-number-65)$ less demo-block/src/init.php
When viewing demo-block/src/init.php
my change in packages/cgb-scripts/template/src/init.php
does not appear.
I really like the way there is a dist folder at the moment, it makes it super easy to update all of clients folders (my plugin isnt ready for release yet so when I make changes I just resync the dist folders on my clients servers).
Ideally I wouldnt push the 'src' folder to my clients sites though (or to the plugin repo) but at the moment the init.php is in the src folder. If this was places in the dist folder or even just in the root folder it would be much better for updates.
When using the same styles on the front and backend, is there a way to have just one stylesheet, rather than repeating the code between the editor.scss and style.scss?
I am not sure if this is a bug or an intended behavior but I when I start the script "npm start", I do get a message in my terminal that the files are being watched.
Currently, whenever I save a file (.js), I don't get any feedback on the terminal if the files have been successfully generated/compiled. So, I just assume that it was a success and need to load the browser and check the console if there are any errors.
I do see that "npm run build" would show the status of the compiled files.
If that's intended, then nevermind this ;)
The strings in the internationalization functions of block.js
need to have a text domain. e.g __( 'CGB Example' )
.
The plugin slug can be easily used for this.
In Gutenberg you can run npm run gettext-strings
which runs cross-env BABEL_ENV=gettext webpack
to create a POT file. We should look into what it takes to have a POT file created for a plugin.
π¨ You need to enable Continuous Integration on all branches of this repository. π¨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didnβt receive a CI status on the greenkeeper/initial
branch, itβs possible that you donβt have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how itβs configured. Make sure it is set to run on all new branches. If you donβt want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, youβll need to re-trigger Greenkeeperβs initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper Appβs white list on Github. You'll find this list on your repo or organizationβs settings page, under Installed GitHub Apps.
I, of course, tested this using 10up-blocks
as the name and it fataled, because PHP functions (and CSS class names) cannot begin with numbers. I would expect the generator to yell at me rather than creating a non-functional plugin.
More broadly, I think any passed arguments should be validated wherever they're not yet, and I think it may make more sense to have a separate namespacing argument especially once getting into the multi-block thing. PHP namespacing would make a lot of sense too, IMO :) Related, for prompts: #26
I haven't tested to see if the initializer warns about anything besides an empty name, but it's possible/likely that this applies to starting with any invalid character or really containing anything besides [A-Z0-9-_]
.
This is a suggestion
The handbook is the only source of official reference at the moment. On this page it uses an init action to attach the block.js and call register_block_type. While this is a bit more code compared to what you have, and your code still works really well, it might be good to follow the precedent (not quite a standard yet) set forth by the handbook.
I had to implement register_block_type so that I could make my block dynamically rendered by the server.
5 stars and 3 cheers. It's wonderful
I have my VSCode set up to use Prettier instead of ESlint. Therefore the two of them are fighting it out over formatting and "errors."
For example, at work, we use 2 spaces instead of tabs and single quotes in our JS. This is flagged as an error.
Instead of creating edit: function( props ) {
, it would be better to create edit({attributes, setAttributes, className, focus, id})
as that leads to less code inside edit for id = props.id
etc.
I think save({attributes, className})
is better for the same reasons I said in #31
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.