Giter Club home page Giter Club logo

foundation-cli's Introduction

Foundation CLI

This is the command-line interface for Foundation family of frameworks. It downloads and installs blank templates in any of the three Foundation frameworks:

Requirements

You'll need the following software installed to get started.

  • Node.js 0.12+: Use the installer provided on the NodeJS website.
    • With Node installed, run [sudo] npm install -g gulp bower.
  • Git: Use the installer for your OS.

Installing

The Foundation CLI is installed through npm.

npm install -g foundation-cli

This will add the foundation command to your system.

Updating

The CLI periodically gets updates that add features or fix bugs. Use npm to upgrade the CLI to the newest version.

npm update -g foundation-cli

To check what version you currently have, use -v.

foundation -v

Commands

New

Starts the setup process for a new Foundation project. The CLI will ask you which framework you want to use and a folder name for the project.

foundation new

Watch

While inside of your app's folder, use the watch command to assemble your app and run a test server.

cd appName
foundation watch

While this process is running, you can view the assembled app in your browser, at this URL:

http://localhost:8080

While the server is running, any changes you make to your HTML, Sass, or JavaScript will automatically be processed and added to your live app.

Build

To build your app for production, use foundation build.

foundation build

Update

Updates your Bower packages, which includes Foundation. Run this command if you're using Bower instead of NPM or Yarn and you want to update an existing project to the newest version of Foundation.

foundation update

Help

Lists all available commands in the CLI.

foundation help

Add a command name at the end to learn how a specific command works.

foundation help new

foundation-cli's People

Contributors

antjanus avatar caraya avatar danielruf avatar gakimball avatar joeworkman avatar joshkel avatar kball avatar michaelrshannon avatar paxperscientiam avatar teyc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foundation-cli's Issues

Problem creating new app with foundation-cli EACCES ~/foundation-apps_3c7d8

I followed instructions listen on Zurb foundation website to install foundation on my Ubuntu 14.04 system.

I encountered the following error while running foundation-apps new myapp command it stops during installing dependencies, throws the following error.
Installing dependencies...

/usr/local/lib/node_modules/foundation-cli/node_modules/bower/node_modules/q/q.js:155
throw e;
^
Error: EACCES, open '/home/nautilus/.cache/bower/registry/bower.herokuapp.com/lookup/foundation-apps_3c7d8'

foundation watching error

After I run watch command I've got some sass error. Maybe I should ask this somewhere else but why gulp is serving files from dist folder and not from src?

➜ ful foundation watch

[email protected] start /Users/michal/Development/web/ful
gulp

[14:36:31] Using gulpfile ~/Development/web/ful/gulpfile.js
[14:36:31] Starting 'build'...
[14:36:31] Starting 'clean'...
[14:36:31] Finished 'clean' after 4.35 ms
[14:36:31] Starting 'pages'...
[14:36:32] Finished 'pages' after 330 ms
[14:36:32] Starting 'sass'...
[14:36:33] Starting 'javascript'...
[14:36:34] Starting 'images'...
[14:36:35] Starting 'copy'...
[14:36:35] Finished 'copy' after 1.05 ms
[14:36:35] Finished 'images' after 739 ms
Error in plugin 'sass'
Message:
src/assets/scss/app.scss
Error: File to import not found or unreadable: foundation
Parent style sheet: stdin
on line 4 of stdin

@import 'foundation';
^

[14:36:35] Finished 'sass' after 2.97 s
[14:36:35] Finished 'javascript' after 1.26 s
[14:36:35] Starting 'styleguide'...
[14:36:35] Finished 'styleguide' after 65 ms
[14:36:35] Finished 'build' after 3.39 s
[14:36:35] Starting 'server'...
[14:36:35] Finished 'server' after 67 ms
[14:36:35] Starting 'default'...
[14:36:35] Finished 'default' after 31 ms
[BS] Access URLs:


   Local: http://localhost:8000
External: http://192.168.0.11:8000

      UI: http://localhost:3001

UI External: http://192.168.0.11:3001


[BS] Serving files from: ./dist

Issues installing NPM Packages

For some reason the Foundation CLI throws me an error about not being able to download NPM packages when I try to create a new site:

npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:
npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:
npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:

There were some problems during the installation.

 ✓ New project folder created.
 ✗ Node modules not installed. Try running npm install manually.
 ✓ Bower components installed.

Once you've resolved the above issues, run foundation watch while inside the what-does-it-cost folder.

PeterMacBookPro% pwd
/Users/peterberwind/code
PeterMacBookPro% cd what-does-it-cost
PeterMacBookPro% npm install
npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:
npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:
npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/peterberwind/.nvm/versions/node/v6.2.1/bin/node" "/Users/peterberwind/.nvm/versions/node/v6.2.1/bin/npm" "install"
npm ERR! node v6.2.1
npm ERR! npm  v3.9.3
npm ERR! code 128

npm ERR! Command failed: git rev-list -n1 4.0
npm ERR! fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/peterberwind/code/what-does-it-cost/npm-debug.log

I'm using nvm, and have tried with node version 4.4.5 and 6.2.1.

PeterMacBookPro% node -v
v6.2.1
PeterMacBookPro% npm -v
3.9.3

Any ideas what could be causing this?

Use Yarn as package manager?

After downloading the template, npm starts doing its thing, which can (in my experience) take over 10 minutes to complete, especially without cached packages. Yarn is generally speedier; it could make the initial setup quicker.

Would it therefore be worth checking whether Yarn is installed on the user's machine - and using it if it is? (I'd imagine installing Yarn is probably beyond the scope of foundation-cli.)

'Foundation watch' not working

Created a project with foundation new
Built the project with foundation build
'foundation watch' runs with no errors, but localhost:8080 shows page cannot be displayed.

Tried at localhost:8000 with the same issue.

failed to create new project if the project name has blank space.

sample:

$foundation new
? What are you building today? A website (Foundation for Sites)
? What's the project called? Arrows Queen
? Which template would you like to use? ZURB Template: includes Handlebars templates and Sass/JS compilers

            .
           /|     ,
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!
     /|/       |/ |       -------------------------------------------
 |___|            |___|   Let's set up a new project.
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.
     | -[O]--[O]- |
     |    ___,    |
     |    ...     |
      \__________/


Downloading the project template...There was an issue running git clone to download the Foundation for Apps template.
Make sure your computer's Git is configured properly and then try again.

If remove the blank space, the result looks well like:

$foundation new
? What are you building today? A website (Foundation for Sites)
? What's the project called? arrowsqueen
? Which template would you like to use? ZURB Template: includes Handlebars templates and Sass/JS compilers

            .
           /|     ,
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!
     /|/       |/ |       -------------------------------------------
 |___|            |___|   Let's set up a new project.
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.
     | -[O]--[O]- |
     |    ___,    |
     |    ...     |
      \__________/


Downloading the project template...
Done downloading!

Installing dependencies...
...

You're all set!

 ✓ New project folder created.
 ✓ Node modules installed.
 ✓ Bower components installed.

Now run foundation watch while inside the arrowsqueen folder.

foundation build error

It seems the new version of the cli is missing the "build" script. Just tried this both on OSX and Windows with the same result:

$ foundation build
Error: missing script: build

Possible EventEmitter memory leak detected. 11 error listeners added.

I get the following warning message when invoking the cli.

Erics-MBP:autok eric$ foundation new
? What are you building today? A website (Foundation for Sites)
? What's the project called? (no spaces) autok
? Which template would you like to use? ZURB Template: includes Handlebars templates and Sass/JS compilers

            .
           /|     ,
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!
     /|/       |/ |       -------------------------------------------
 |___|            |___|   Let's set up a new project.
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.
     | -[O]--[O]- |
     |    ___,    |
     |    ...     |
      \__________/


Downloading the project template...
Done downloading!

Installing dependencies...

(node:26925) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:26925) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:26925) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:26925) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:26925) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit

However the project does get created and it works.

Foundation does not output npm exit code

When I start my build process by calling npm run-script build --production and the build fails for some reason, npm exits with an error status code 1. This is important for CI-processes (e.g. gitlab-ci), which decide upon success or failure of a build through the exit code.

However, when I use foundation build, the status code is always the non-error 0, throwing off CI-pipelines.

Instead, it should pass through the exit code produces by the npm run-script...-call upon watch or build.

Can't install through npm

When running sudo npm install -g foundation-cli I get tons of warnings like below:

npm WARN install:mute-stream ENOENT: no such file or directory, rename '/usr/lib/node_modules/foundation-cli/node_modules/mute-stream' -> '/usr/lib/node_modules/foundation-cli/node_modules/mute-stream'
npm WARN install:next-tick ENOENT: no such file or directory, rename '/usr/lib/node_modules/foundation-cli/node_modules/next-tick' -> '/usr/lib/node_modules/foundation-cli/node_modules/next-tick'
npm WARN install:node-uuid ENOENT: no such file or directory, rename '/usr/lib/node_modules/foundation-cli/node_modules/node-uuid' -> '/usr/lib/node_modules/foundation-cli/node_modules/node-uuid'

and finally

npm ERR! Linux 4.1.10-1-MANJARO
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "foundation-cli"
npm ERR! node v4.1.2
npm ERR! npm  v3.3.6

npm ERR! Cannot read property 'forEach' of undefined
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/gcg/npm-debug.log

Am I doing something wrong?

Interchange does not work when building a site for production

I'm using interchange on some images.
It works when I use the watch command to assemble my site and run it on a test server.
However, when I build my site for production, using the 'foundation build' command, interchange does not work anymore.

Extra junk appearing in inlined html file...

I'm using foundation cli to build e-mails and I must say it is AWESOME.

But one little issue.

When I get the final html file using npm run build it comes with this bit of extra code right after the opening body tag:

//<![CDATA[
    document.write("<script async src='/browser-sync/browser-sync-client.2.14.0.js'><\/script>".replace("HOST", location.hostname));
//]]></script>

Also it seems unnecessary to include this as well:

<link rel="stylesheet" type="text/css" href="css/app.css">

Is there away to nicely output the final HTML without these bits?

I am using Node v. 4.4.5 on windows.

Thanks!

ERROR installing Foundation-CLI on OS X 10.10.1

This is the error message i get installing foundation-cli. Hope someone has an idea.

$ sudo npm install -g foundation-cli
/usr/local/bin/foundation-apps -> /usr/local/lib/node_modules/foundation-cli/bin/cli.js

> [email protected] postinstall /usr/local/lib/node_modules/foundation-cli
> node lib/welcome.js

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

node.js:838
    var cwd = process.cwd();
                      ^
Error: EACCES, permission denied
    at Function.startup.resolveArgv0 (node.js:838:23)
    at startup (node.js:58:13)
    at node.js:929:3
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "foundation-cli"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.17
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node lib/welcome.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node lib/welcome.js'.
npm ERR! This is most likely a problem with the foundation-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lib/welcome.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls foundation-cli
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/penner/Documents/CloudStation/projects/Code/cms/public/npm-debug.log

Improper functionality and documentation.

I just updated from Foundation 4 to Foundation 6 and followed the documentation provided.

I'm on a Mac running NPM version 3.7.3 and Node version 7.6.0

I use Bash as my shell but have updated it to the latest version (via Homebrew).

I have used/installed Foundation 6 previously for a WordPress theme I was working on but I had not installed it globally.

Before updating I ran $ foundation -v and got Could not find command "_v".

So then I tried foundation version and got v1.0.4

Then I ran $ npm install -g foundation-cli which seemed to work but $ foundation -v returned Could not find command "_v". and $ foundation version returned v1.0.4

Then I tried $ npm install --global foundation-cli and that seemed to work, the final result indicated it had updated to [email protected]

$ foundation -v again returned Could not find command "_v".

I ignored that and tried foundation help new (all your docs say is to run foundation new to start a new project) which returns:

Usage:
  foundation new

Options:
  [--libsass], [--no-libsass]  
  [--version=VERSION]          

create new project

I figured a project name would be needed but I followed the docs.

So I ran $ foundation new and got:

ERROR: "foundation new" was called with no arguments
Usage: "foundation new"

From what I remember, to create a new project, I'd guess I need to run $ foundation new myproject --libsass (or whatever the option I desire is) but at this point, I'm just guessing.

foundation watch

I stuck on this when i run the foundation watch. Could you tell me how to fix this ?

untitled-1

Detect if sudo is needed when running npm install

A fair number of users may need to run npm install with sudo, but the installer always runs it without sudo. The installer should try to run npm install, and if it catches an EACCESS error, switch to sudo npm install instead.

Upgrading foundation-cli 2.1.0 → 2.2.1 writes to /usr/lib/ instead /usr/local/lib/

I already posted this on the forums, but maybe it is more appropriate here:
http://foundation.zurb.com/forum/posts/52302-upgrading-foundation-cli-from-210--221-fails

Hi there!

I decided to check out the new building blocks, so I apparently needed to upgrade my foundation-cli which somehow fails. Before and after I get shown I have 2.1.0 still:

$ foundation -v
Foundation CLI version 2.1.0

I tried the following commands, all giving no npm errors:

$ sudo npm update -g foundation-cli
$ sudo npm install -g [email protected]

Any idea what’s happening? (I run Ubuntu Studio 14.04.5 LTS on my dev machine.)


After some more debugging, I found this:

$ sudo npm uninstall -g foundation-cli
unbuild [email protected]

$ sudo npm install -g [email protected]
/usr/bin/foundation -> /usr/lib/node_modules/foundation-cli/bin/foundation.js
[email protected] /usr/lib/node_modules/foundation-cli
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected]
└── [email protected]

$ foundation -v
Foundation CLI version 2.1.0

$ which foundation 
/usr/local/bin/foundation

$ ls -la /usr/local/bin/foundation 
lrwxrwxrwx 1 root root 52 Mär 11 16:18 /usr/local/bin/foundation -> ../lib/node_modules/foundation-cli/bin/foundation.js

I wonder what to do now without breaking customer sites, because for whatever reason I now have got a node-modules/foundation-cli both under /usr/local/lib/ and /usr/lib/. The one under usr/lib/ has the package.json with "version": "2.2.1" in it, while the system seems to prefer the one under /usr/local/lib (which has v2.1.0 in it’s package.json).

I think one of the updates or installs must have broken it. My /usr/lib is much more populated than /usr/local/lib and I’d actually prefer foundation being installed under /usr/lib.

My /usr/lib/node_modules has:

$ ls -la
insgesamt 48
drwxr-xr-x   4 root   root      4096 Apr 21 22:52 .
drwxr-xr-x 246 root   root     36864 Apr 18 11:17 ..
drwxr-xr-x   5 nobody matthias  4096 Apr 21 22:52 foundation-cli
drwxr-xr-x   9 root   root      4096 Apr  5 11:36 npm

and my /usr/local/lib/node_modules has:

$ ls -la
insgesamt 16
drwxr-xr-x  4 nobody matthias 4096 Mär 11 16:18 .
drwxr-xr-x 10 root   root     4096 Nov 22 21:02 ..
drwxr-xr-x  5 nobody matthias 4096 Mär 11 16:18 foundation-cli
drwxr-xr-x  8 nobody matthias 4096 Jul 26  2015 markdown-pdf

Can anyone knowledgeable please put me right? THANK YOU!

foundation update not working?

I have the latest cli version installed on my mac. Until today I had no issues with the cli commands regarding to the work with foundation sites.
Now I want to update my existing project from the version 6.0.6 to the latest foundation sites version. Everytime when I use the foundation update command in my app folder the terminal says "Nothing to update. You´re good!"

Has someone an idea what the problem could be?
If I create a new project I´ll get the newest version installed (current: 6.1.2)

Many thanks for an answer.

With best regards

Kevin

"foundation new --framework site --template basic" failed

I got this issue:

foundation new --framework site --template basic
? What's the project called? (no spaces) first-foundation

        .
       /|     ,
  , /|/  \/| /|       Thanks for using ZURB Foundation for Site!
 /|/       |/ |       -------------------------------------------

|_| || Let's set up a new project.
**| ^^ ^^ |**/ It shouldn't take more than a minute.
| -[O]--[O]- |
| **
, |
| ... |
______**/

Downloading the project template...There was an issue running git clone to download the Foundation for Apps template.
Make sure your computer's Git is configured properly and then try again.

But it's ok when I ran foundation new

Post-install hook to check for Ruby CLI

When the CLI finishes installing, it should check if the user's machine has a foundation command and give a warning. The warning will fire if you have the Ruby CLI installed.

Post-install scripts sometimes fail on Windows machine, so we'll need to test there.

Switching between CLI versions

Foundation 6 is awesome, thanks for a great release. The problem is how to continue to maintain F5 projects after upgrading the CLI. I found the below on the docs but it somewhat confusing. If all it takes to switch back is install the old gem? i.e. gem install foundation?

_"If you already have the Foundation 5 CLI on your machine, you will only be able to access one of the commands, depending on how your command line environment is configured.

If you want to remove the old CLI, run gem uninstall foundation. After testing this new CLI, if you want to go back to the old CLI, run npm uninstall foundation-cli --global."_

swath of issues (assign to me)

minor

  • program should confirm existence of framework before prompting user when --framework flag is used.
  • unrecognized arguments should be rejected
  • indicate arguments and values in help menu
  • indirectly related, but browser-sync server should reload on html change
  • update messages array (neaten as well) to account for unknown options
  • though suggested that new --template basic should work, it does not.
  • manually specifying a project type should allow for fuzzier matching (ie app versus apps)

major

  • fix options parsing
  • dialog tree does not respect flags/options.

Update npm dependency to v3+ for flat install

Right now, using this cli tool to create a project with the Zurb foundation template pulls in about 700MB of dependencies. But when you clone the template from GitHub and run npm install inside of the directory, it only pulls in about 170MB.

This is happening because the cli uses npm v2 to programmatically perform the installation. Version 3 of npm introduced the new "flat" style of module installation, which supports dependency de-duplication. By using npm v2 to programmatically install the dependency, you are sacrificing de-duplication and dramatically increasing both the install size on disk and the amount of time that it takes to perform the install.

The fix is extremely easy: just change "npm": "^2.1.12" line in your package.json so that it uses a newer version.

How to use 3rd-party CSS?

I'm trying to use the Card component from Semantic UI (https://github.com/Semantic-Org/UI-Card), which is available both as a bower and npm package. Installing the package downloads a CSS file (card.css), which I want to include in my dist stylesheet. I tried doing this by:

  1. bower install --save semantic-ui-card

  2. In the gulfile.js, update the value of PATHS.sass to:

    sass: [
       'bower_components/foundation-sites/scss',
       'bower_components/motion-ui/src/',
       'bower_components/semantic-ui-card/card.css'
     ],
    
  3. Running gulp build, gulp watch and foundation watch

I expected that this would download the css file, and include its contents in the dist output due to the 'sass' gulp task.

However, while the card.css file has been correctly downloaded to the path mentioned above, its contents are not included in dist\assets\css\app.css.

I also tried changing the file extension to .scss , and updating the path accordingly. I tried installing by npm first and that didn't work either.

Could you tell me how I'm meant to import 3rd-party css from the bower_components folder into my production code?

Error running watch after installing

matt:test matt$ npm install -g foundation-cli
matt:test matt$ foundation-apps new test
matt:test matt$ cd test
matt:test matt$ foundation-apps watch
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.10.32
npm ERR! npm v2.0.0
npm ERR! path /Users/matt/package.json
npm ERR! code ENOENT
npm ERR! errno 34

npm ERR! ENOENT, open '/Users/matt/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /Users/matt/Work/test/npm-debug.log
matt:test matt$

Log

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/local/bin/node
5 verbose config Skipping project config: /Users/matt/.npmrc. (matches userconfig)
6 verbose stack Error: ENOENT, open '/Users/matt/package.json'
7 verbose cwd /Users/matt/Work/test
8 error Darwin 13.4.0
9 error argv "node" "/usr/local/bin/npm" "start"
10 error node v0.10.32
11 error npm v2.0.0
12 error path /Users/matt/package.json
13 error code ENOENT
14 error errno 34
15 error ENOENT, open '/Users/matt/package.json'
16 error If you need help, you may report this error at:
16 error http://github.com/npm/npm/issues
17 verbose exit [ 34, true ]

Zurb installation on Windows 7

I tried the standard site installation on Windows 7 and it worked great. However when I try to create a foundation project for the Zurb Template I get an error. Any help in getting this to install correctly?

λ foundation new
? What are you building today? A website (Foundation for Sites)
? What's the project called? (no spaces) my-zurb-project
? Which template would you like to use? ZURB Template: includes Handlebars templates and Sass/JS compilers

        .
       /|     ,
  , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!
 /|/       |/ |       -------------------------------------------

|_| || Let's set up a new project.
**| ^^ ^^ |**/ It shouldn't take more than a minute.
| -[O]--[O]- |
| **
, |
| ... |
______**/

Downloading the project template...
Done downloading!

Installing dependencies...

events.js:141
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at exports._errnoException (util.js:874:11)
at TLSWrap.onread (net.js:544:26)

Console errors

file:///C:/Users/John/Desktop/PersonalStylist/bower_components/what-input/what-input.js Failed to load resource: net::ERR_FILE_NOT_FOUND file:///C:/Users/John/Desktop/PersonalStylist/bower_components/foundation-sites/dist/foundation.js Failed to load resource: net::ERR_FILE_NOT_FOUND app.js:1 Uncaught TypeError: $(...).foundation is not a function at app.js:1

For the what-input, the js file is in the dist folder. Also the foundation is in a js folder inside the dist folder, and not the dist alone. Will this be fixed in an update?

git error vague on 'foundation new'

git is fully configured and functional on the system, but foundation new (any project) fails with:

Downloading the project template...There was an issue running git clone to download the....
Make sure your computer's Git is configured properly and then try again.

looks like it's the result of this clone command

Error should be more specific about the nature of the failure.
Does git need a symlink?

osx 10.11.6

$ foundation --version
Foundation CLI version 2.2.0
$ npm --version
3.9.5
$ node --version
v6.2.2
$ git --version
git version 2.2.1
$ which git
/usr/local/git/bin/git

Appetite for custom builds via CLI?

~~OK, I'm putting this here for now so I don't forget, but also to see whether or not you folks think it's worth the effort.

I was thinking it would be neat to leverage the custom build functionality from here.

Is there an API for this? Is this featured called Foundation Customizr or something like that?
Lastly, is there enough demand for this? Should we take a "if we build it, they will come" attitude? I guess that's a question for the marketing folks.~~

EDIT:
So, I've got a deeper understanding of what foundation-cli is doing; this seems to be partially done already.

EDIT:
closing

"foundation blocks" fails

When I run foundation blocks or foundation kits I receive an error that "fn is not a function". Here is the complete message.

/usr/local/lib/node_modules/foundation-cli/lib/commands/kits.js:16
  fn(args.slice(1), options, callback);
  ^

TypeError: fn is not a function
    at Object.module.exports [as kits] (/usr/local/lib/node_modules/foundation-cli/lib/commands/kits.js:16:3)
    at Object.<anonymous> (/usr/local/lib/node_modules/foundation-cli/bin/foundation.js:61:28)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)

Other commands like foundation new and foundation watch work fine.

System:

  • OSX: 10.12.4
  • Node: v7.8.0
  • NPM: 4.2.0
  • Foundation-CLI: Foundation CLI version 2.2.0

foundation-cli@beta - unable to create project from template

$ foundation new --framework sites --template advanced
? What's the project called? warply

            .
           /|     ,
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!
     /|/       |/ |       -------------------------------------------
 |___|            |___|   Let's set up a new project.
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.
     | -[O]--[O]- |
     |    ___,    |
     |    ...     |
      \__________/


```Downloading the project template.../usr/local/lib/node_modules/foundation-cli/node_modules/update-notifier/node_modules/configstore/node_modules/graceful-fs/polyfills.js:14
  chdir.call(process, d)
        ^

Error: ENOENT: no such file or directory, uv_chdir
    at Error (native)
    at process.chdir (/usr/local/lib/node_modules/foundation-cli/node_modules/update-notifier/node_modules/configstore/node_modules/graceful-fs/polyfills.js:14:9)
    at process.chdir (/usr/local/lib/node_modules/foundation-cli/node_modules/bower/node_modules/bower-config/node_modules/graceful-fs/polyfills.js:18:9)
    at process.chdir (/usr/local/lib/node_modules/foundation-cli/node_modules/bower/node_modules/graceful-fs/polyfills.js:14:9)
    at process.chdir (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:18:9)
    at /usr/local/lib/node_modules/foundation-cli/lib/commands/new.js:84:15
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/exec/exec.js:90:5)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)

Unable to load imports from bower_components

I went through the install process using npm and have made sure that everything is up to date. It seems that the setup is unable to resolve imports. It does not appear that $.sass({ includePaths: sassPaths}); is functioning when running foundation watch or foundation build.

screen shot 2015-11-24 at 1 43 23 pm

node-sass 3.4.2 (Wrapper) [JavaScript]
libsass 3.3.2 (Sass Compiler) [C/C++]

Improvements for installation of blocks and kits

Kits and blocks are a super idea! I wish I had known about this before.

  • number each item in list printed to stdout (see #62 )
  • allow for installation by index number. e.g.: foundation blocks install 42
  • Allow listing blocks by category (--sort flag)
  • Allow listing kits with blocks as sub-items (--details flag)
  • Allow searching blocks with text
  • indicate which blocks/kits have been included in the "current" project when listing or more explicit command.
  • abstract out common functions
  • add a "contains" sub-command or similar for kits
  • option to un-zip

Cybernetics:

  • foundation-cli should warn end-user if attempting install of block (or kit) into non-project directory, whiling following up with a suggestion given knowledge of root directory.
  • where ought these files be installed? Default should remain. However, what about assisting in placement? Specific directories for this and that. EDIT: seems that there are relevant abandoned features

Foundation CLI installer via SSH

Hey there guys,

I'm trying to set up a new foundation project for one of my upcoming themes and I'm having issues getting it up and running.

I've already created a development environment on my Dev server and have WordPress up and running with a bare bones SASS powered theme. I've gone in via SSH and navigated to my themes directory and installed the CLI using npm install --global foundation-cli which works fine.

My issue is creating the project itself. When I run the create command foundation new I get the following error

foundation_cli_error

I'm not really quite sure how I'm supposed to get up and running if I can't install this via SSH. The development site needs to be on this sever and accessing it via SSH is the only way I can get command line access.

Any thoughts on what I should do guys?

Cheers

"foundation new" was called with no arguments

As of Ubuntu 15.10 this app doesn't do... anything?

$ foundation new
ERROR: "foundation new" was called with no arguments
Usage: "foundation new"

When following the official documentation I get some fun errors too:

$ foundation new --framework sites --template zurb
ERROR: "foundation new" was called with arguments ["--framework", "sites", "--template", "zurb"]
Usage: "foundation new"

Weird side note: I did a fresh install, but it says:

$ foundation version
v1.0.4

foundation watch doesn't working

I'm running the foundation for emails,

when I run the foundation watch command, everything seems ok, I open the localhost:3000 and there is my template, but when I edit the html or sass files, the page doesn't reload or update the content, even if I force the reload, the page keeps same.

I attached a screenshot of terminal running command.

screen shot 2017-02-22 at 4 27 16 pm

[email protected]: messages undefined in noRoot check

/usr/lib/node_modules/foundation-cli/lib/commands/new.js:38
      console.log(util.mascot('sites', messages.noRoot));
                                               ^
TypeError: Cannot read property 'noRoot' of undefined
    at preflight (/usr/lib/node_modules/foundation-cli/lib/commands/new.js:38:48)
    at /usr/lib/node_modules/foundation-cli/node_modules/async/lib/async.js:607:21
    at /usr/lib/node_modules/foundation-cli/node_modules/async/lib/async.js:246:17
    at iterate (/usr/lib/node_modules/foundation-cli/node_modules/async/lib/async.js:146:13)
    at async.eachSeries (/usr/lib/node_modules/foundation-cli/node_modules/async/lib/async.js:162:9)
    at _asyncMap (/usr/lib/node_modules/foundation-cli/node_modules/async/lib/async.js:245:13)
    at Object.mapSeries (/usr/lib/node_modules/foundation-cli/node_modules/async/lib/async.js:228:23)
    at Object.async.series (/usr/lib/node_modules/foundation-cli/node_modules/async/lib/async.js:605:19)
    at Object.module.exports [as new] (/usr/lib/node_modules/foundation-cli/lib/commands/new.js:33:9)
    at Object.<anonymous> (/usr/lib/node_modules/foundation-cli/bin/cli.js:68:28)

The issue looks to be that messages is defined in prompt(step 2) once a project has been chosen, but if the app is run as root then preflight(step 1) assumes it is already defined.

gulp watch and foundation watch errors

I've installed newest foundation-cli ( foundation -v doesn't work, it only shows help info, so i've checked version with foundation --version command: Foundation CLI version 2.0.1 ) on Ubuntu 15.04. Gulp and foundation watch stop working and throwing error in CLI as below:

$ gulp
[08:42:34] Using gulpfile ~/Workspaces/max-test/gulpfile.js
[08:42:34] Starting 'build'...
[08:42:34] Starting 'clean'...
[08:42:34] Finished 'clean' after 4.51 ms
[08:42:34] Starting 'pages'...
[08:42:34] Starting 'sass'...
[08:42:35] Starting 'javascript'...
[08:42:35] Starting 'images'...
[08:42:35] Starting 'copy'...
[08:42:35] Finished 'images' after 313 ms
[08:42:35] Finished 'pages' after 1.32 s
[08:42:35] Finished 'copy' after 62 ms
[08:42:35] Finished 'javascript' after 585 ms

/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/postcss/lib/lazy-result.js:157
        this.processing = new Promise(function (resolve, reject) {
                              ^
ReferenceError: Promise is not defined
    at LazyResult.async (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/postcss/lib/lazy-result.js:157:31)
    at LazyResult.then (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/postcss/lib/lazy-result.js:79:21)
    at DestroyableTransform._transform (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/index.js:24:6)
    at DestroyableTransform.Transform._read (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:10)
    at DestroyableTransform.Transform._write (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:160:12)
    at doWrite (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:335:12)
    at writeOrBuffer (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:321:5)
    at DestroyableTransform.Writable.write (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-autoprefixer/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:248:11)
    at DestroyableTransform.ondata (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:583:20)
    at DestroyableTransform.emit (events.js:95:17)
    at readableAddChunk (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:201:16)
    at DestroyableTransform.Readable.push (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:165:10)
    at DestroyableTransform.Transform.push (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:133:32)
    at afterTransform (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:81:12)
    at TransformState.afterTransform (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:59:12)
    at filePush (/home/ubuntu_user/Workspaces/max-test/node_modules/gulp-sass/index.js:110:7)

Drop Babel

I think babel slows down the build process quite a bit. Why not drop babel and use a more up-to-date node version, to use ES6 features natively?

See feature comparison here: http://node.green/

Thoughts? Feedback?

Babel error with foundation watch command

A user in foundation/foundation-sites#8560 discovered that when you run foundation watch you get the following error:
Failed to load external module babel-register.

It follows that error with:
Requiring external module babel-core/register

After that it runs as expected. This does not happen, when I clone a template, or when I simply run gulp from inside CLI project instead of foundation watch. Others report that it doesn't matter whether they run foundation watch or gulp, they still get the error.

My best guess for why this happens only on foundation watch with the CLI is because the foundation command is being run globally and it looks for babel-register there instead of locally on the first attempt to find it.

Error installing foundation-clint (LM17)

$ sudo npm install -g foundation-cli
/usr/bin/foundation -> /usr/lib/node_modules/foundation-cli/bin/foundation.js
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "foundation-cli"
npm ERR! node v0.12.15
npm ERR! npm  v2.15.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants eslint@>=2.9.0

npm ERR! Please include the following file with any support request:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.