deprecate / electric-cli Goto Github PK
View Code? Open in Web Editor NEWCLI for creating and building electric sites.
CLI for creating and building electric sites.
After creating a new project using generator I've run the el dev
and the following errors have occurred.
Error in plugin 'sass'
Message:
src/styles/main.scss
Error: File to import not found or unreadable: marble.
Parent style sheet: /Users/fernandosouza/projects/liferay/code-mirror/src/styles/main.scss
on line 3 of src/styles/main.scss
>> @import "marble";
^
[16:55:36] Starting 'metal:render:soy'...
/Users/fernandosouza/.nvm/versions/node/v5.12.0/lib/node_modules/electric-cli/node_modules/electric/lib/handleError.js:13
throw err;
^
Error: TypeError: Cannot read property 'children' of undefined
at Object.blog.olderPosts (/tmp/soynode/temp/soyweb/layouts/blog.soy.js:50:56)
at Object.blog.render (/tmp/soynode/temp/soyweb/layouts/blog.soy.js:19:230)
at Object.nHyMp.render (/tmp/soynode/temp/soyweb/pages/blog/markdown-post.soy.js:19:55)
at nHyMp.soyweb (/tmp/soynode/temp/soyweb/pages/blog/markdown-post.soy.js:34:169)
at SoyCompiler.render (/Users/fernandosouza/.nvm/versions/node/v5.12.0/lib/node_modules/electric-cli/node_modules/soynode/lib/SoyCompiler.js:102:47)
at renderSoyWeb (/Users/fernandosouza/.nvm/versions/node/v5.12.0/lib/node_modules/electric-cli/node_modules/gulp-soynode/index.js:205:26)
at /Users/fernandosouza/.nvm/versions/node/v5.12.0/lib/node_modules/electric-cli/node_modules/gulp-soynode/index.js:139:20
at Array.forEach (native)
at /Users/fernandosouza/.nvm/versions/node/v5.12.0/lib/node_modules/electric-cli/node_modules/gulp-soynode/index.js:125:15
at Array.forEach (native)
i found setting way to change github branch, edit electric.config.js,add deployOptions: { branch: 'gh-pages' }
, it successed,but i change the branch name to docs
,i get 'deploy:gh' errored after 691 ms
[13:01:29] 'deploy:gh' errored after 691 ms
[13:01:29] Error in plugin 'gulp-gh-pages'
Message:
Command failed: git rev-list --pretty=raw --skip=0 --max-count=10 docs
fatal: ambiguous argument 'docs': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Details:
killed: false
code: 128
signal: null
cmd: git rev-list --pretty=raw --skip=0 --max-count=10 docs
Finished 'deploy'...
Following the installation instructions on the website, I get the following when attempting a electric init
:
(node:3292) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: `email` required
The process hangs, and must be terminated (SIGINT/SIGKILL).
Nowadays, if you type electric run
on a folder that doesn't contain the electric.config.js
file you get an error.
➜ wedeploy.com (master) ✔ electric run
Running 'run'...
[13:17:34] Starting 'build'...
[13:17:34] Starting 'clean'...
[13:17:34] Starting 'clean:dest'...
[13:17:34] Starting 'clean:temp'...
[13:17:34] Finished 'clean:dest' after 6.62 ms
[13:17:34] Finished 'clean:temp' after 3.14 ms
[13:17:34] Finished 'clean' after 8.24 ms
[13:17:34] Starting 'front-matter'...
[13:17:34] Starting 'static'...
[13:17:34] Starting 'styles'...
[13:17:34] Starting 'vendor'...
[13:17:34] Starting 'vendor:codemirror'...
[13:17:34] Starting 'vendor:custom'...
[13:17:34] Starting 'vendor:senna'...
[13:17:34] Finished 'vendor:custom' after 5.71 ms
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: Error: ENOENT: no such file or directory, open '/Users/zeno/Projects/wedeploy.com/src/site.json'
We could do something like gulp and display something message to the user:
➜ wedeploy.com (master) ✗ gulp
[13:18:47] Local gulp not found in ~/Projects/wedeploy.com
[13:18:47] Try running: npm install gulp
I think electric
is a long word to type into the terminal. We can often forget a letter and it will be frustrating to retype it again. Could we create an alias
like el
, elec
?
Angular 2 CLI has a feature that it might be helpful for electric-cli
. It provides a way to generate files from command line. For example:
ng g component
- Generates all configurations and files to get a component running.ng g directive
- Generates all configurations and files to get a directive running.We can create tasks like:
electric g layout
;electric g doc-page
;electric g blog-page
;When I query electric with help
I currently see:
nolanchan ~ $ electric --help
Commands:
build Builds site and places files in dist.
deploy Builds site and and deploys dist files to git branch.
init Initializes a new electric project.
run Builds site, and starts up watch task along with development server.
server Starts development server for local testing.
watch Watches for changes to src files.
Options:
--help Show help
However, there is no option to see the current version of electric-cli. Having something like npm's version command would be great
nolanchan ~ $ npm -v
3.10.8
Update:
There also seems to be some mismatch between the version name on npmjs.com and the actual version pulled down. npmjs.com claims that 2.0.0-alpha.0 is the most up to date version, but the version that was downloaded today was 2.0.0-alpha.3
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.