Giter Club home page Giter Club logo

slate-cli's Introduction

Slate CLI

This repo has been deprecated. Please open any new issues or PRs in the Shopify/slate repo.

slate-cli's People

Contributors

bertiful avatar cshold avatar davidcornu avatar m-ux avatar nathanpjf avatar stevebosworth avatar t-kelly avatar

Stargazers

 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  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

slate-cli's Issues

Windows Support

TBD whether or not this is worth doing for 1.0.0 (largely depends on the status of ubuntu for Windows)

  • normalization for OS paths, any other code changes required
  • testing with powershell or other common windows terminal environments.

Error when config.yml isn't there

Problem

Error: ENOENT: no such file or directory, open 'config.yml'

It throws an error. Ideally this should just say it needs a config.yml

Compatibility issue with nodejs 8.x

Problem

slate build generates error on line 97 of index.js when using nodejs 8.x
if (!require.extensions.hasOwnProperty(ext)) {

Scope

slate command on systems with nodejs 8.x or higher installs

Replication steps

Install slate and slate-tools on a system with nodejs 8.x

More Information

It appears this issue is related to the removal of require.extensions from nodejs 8.

According to this answer on StackOverflow:
https://stackoverflow.com/a/44301178

require.extensions was deprecated in nodejs v0.10.6, but not dropped from the nodejs codebase until nodejs 8.0.
https://nodejs.org/api/globals.html#globals_require_extensions

Unhandled 'error' event

Problem

slate watch fails randomly after x minutes of normal operation with the error Unhandled 'error' event

Replication steps

There are really none I can state other than using slate watch

More Information

I am using Windows 10 x64 (latest stable)
WebStorm (latest stable)
Node 6.11.0 (latest lts)

See the attached txt doc for console output that shows the issue.

Thanks!!

console-log.txt

`slate th` claims npm commands are a success despite them failing

~/Development/slate_test
❯ slate th
? What do you want to name the directory for your theme? Spectacular

  This may take some time...

  ✓ slate-theme download completed
npm ERR! Darwin 16.1.0
npm ERR! argv "/Users/davidcornu/.nvm/versions/node/v7.1.0/bin/node" "/Users/davidcornu/.nvm/versions/node/v7.1.0/bin/npm" "install" "@shopify/slate-tools" "--save-dev" "--save-exact"
npm ERR! node v7.1.0
npm ERR! npm  v3.10.9
npm ERR! code E402

npm ERR! You need a paid account to perform this action. For more info, visit: https://www.npmjs.com/private-modules : @shopify/slate-tools
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/davidcornu/Development/slate_test/Spectacular/npm-debug.log
  ✓ devDependencies installed
  ✓ Spectacular theme is ready

slate watch catches DS_Store with every file change

Every local change while slate is watching, triggers the theme upload of the file successfully, then detects change in .DS_Store, tries to run theme upload on that file and then gets hung there, staying at 0%

ds_store-bug

Tried adding DS_Store to ignore files and has no effect

ignore_files:
- "*.DS_Store"

unclear messaging around "Slate theme directory"

If you're outside a theme directory and you evoke the help function, you're presented with the following:

screen shot 2016-11-11 at 2 39 15 pm

While, inside a theme directory you get this:

screen shot 2016-11-14 at 10 22 23 am

A few things about this seem problematic to me:

  1. The red x makes it feel like an error when you're not in a theme directory. Has something gone wrong with my Slate install?
  2. The message is not clear around why you're getting this message (it tells you how to fix it, but not why it's appearing).
  3. When you're inside a theme directory, it's confusing that you're getting a validation check, again without the context of why.

@macdonaldr93 @Shopify/themes-fed

slate new theme breaks when not tracking in git

slate new theme tester fails after you answer n to Will you be tracking this theme in git?

 >> slate new theme tester
? Will you be deploying this theme to multiple environments? No
? Will you be tracking this theme in git? No
Unknown scaffold, please use one of the following scaffolds:
 slate

events.js:154
      throw er; // Unhandled 'error' event
      ^
AssertionError: Trying to copy from a source that does not exist: /Users/carsonshold/Documents/Projects/slate-cli/node_modules/Slate/generators/config.yml.ejs

@macdonaldr93 @m-ux

A few commands log "[]" when they're done

❯ slate new theme
? Please enter a name for your theme (folder will be created) Funky
? Will you be deploying this theme to multiple environments? No
...

[] 👈 What's this?
❯ slate new section
? Please enter a name for your section (folder will be created) gallery
   create javascript.js
   create schema.json
   create style.liquid
   create template.liquid
[] 👈 Same here
❯ slate test
[10:34:10] Using gulpfile ~/Development/slate_test/Funky/gulpfile.js
[10:34:10] Starting 'test'...
[10:34:10] Starting 'lint:js'...
[10:34:11] Finished 'lint:js' after 1.03 s
[10:34:11] Starting 'lint:css'...
[10:34:12] Finished 'lint:css' after 353 ms
[10:34:12] Starting 'lint:json'...
[10:34:12] Finished 'lint:json' after 87 ms
[10:34:12] Finished 'test' after 1.47 s
[] 👈 Same here

GH Readme: Requirements Section

We need to add a requirements section - with info around what version of node is required, and other requirements.

ie. git

(anything else that is a requirement should be listed as well).

Sync Commands open browser window with published theme, not Development theme.

Problem

I've got three environments set up, Development, Staging, and Production. The Production environment is live.

When I use one of the Sync Commands [deploy, watch, start] on either Development or Staging environments, The browser window that automatically opens up at https://localhost:3000, my 'live' Production environment.

Which leads to the issue, when I make changes, BrowserSync refreshes the page, but obviously I can't see any changes because it is displaying the wrong environment.

Scope

Not sure, but probably related to how themekit interacts with BrowserSync.

Replication steps

Node v6.7.0
NPM v3.10.7
Slate v0.9.1

nothing special in my config.yml:

---
development:
password: THEMEKIT_PASSWORD
theme_id: "163808707"
store: THEMEKIT_STORE
ignore_files:
- config/settings_data.json
staging:
password: THEMEKIT_PASSWORD
theme_id: "163824835"
store: THEMEKIT_STORE
ignore_files:
- config/settings_data.json
production:
password: THEMEKIT_PASSWORD
theme_id: "162599811"
store: THEMEKIT_STORE
ignore_files:
- config/settings_data.json

More Information

Usually when one views an unpublished theme there is a url param.
it should be something like this, right?

https://localhost:3000/?key=3479939321d9d4d43f0ff418f9ed258ee6a4260e61c89608d4eb17199ae9d34c&preview_theme_id=163808707

These are my Access URLs:

      Local: https://localhost:3000
      External: https://10.1.10.74:3000

      UI: http://localhost:3001
      UI External: http://10.1.10.74:3001

slate theme utf8 figures

Just noticed that slate theme still has characters such as . These should have been changed over to use the figures package for cross-OS support. figures.tick should be used.

\cc @NathanPJF

Working with SASS dependencies in node_modules

Problem

It does not seem to be possible to import a sass file from the node_modules which have some dependencies.

Scope

Issue related to slate-watch.

Replication steps

In theme.scss:

@import url('../../node_modules/lib-a/scss/lib-a.scss');

In lib-a.scss:

@import '../_vendor/lib-b/sass/lib-b';

Error when using slate watch:

[10:47:05] change in src/styles - change theme.scss
[10:47:05] running task - build:css
[10:47:05] Error in plugin 'gulp-cssimport'
Message:
    Cannot find file '../_vendor/lib-b/sass/lib-b' from 
    '/[project-path]/node_modules/lib-a/scss' (includePaths: )

More Information

It could be caused by the result of this logic:
https://github.com/Shopify/slate/blob/master/docs/theme-scaffold/index.md#sass-helpers
The tool is uploading local SCSS files, not compiling them. This might cause an issue with files from node_modules?

What would be the workaround?

Should the default behaviour be to replace the active theme?

Once I've initialized a new theme using slate new theme, my options are

  1. Provide a theme_id option for ThemeKit (http://themekit.cat/docs/ doesn't mention where to actually get it, I copied it from the URL of the HTML editor)
  2. Replace the active theme on my shop

I would assume the sensible option is to create a new theme on my shop and store that id in my config.yml.

Verbose ThemeKit output - no context through Slate

On a deploy command ( along with issue #95 ) we output verbost themekit instructions on how to properly call the underlying themekit command (which doesn't help a slate user, and potentially adds confusion to the issue).

screen shot 2016-11-14 at 10 07 00 am

Is there a way we can turn logging off for themekit commands?

Possible to have it push/pull to git before deploy?

Problem

I'd really like to bring Slate CLI into my workplace, but we use BitBucket here to work collab so the typical build & upload to Shopify wouldn't be suitable.

Would it be possible to somehow have it push to BitBucket before being deployed?

Enhance the migrate command to beautify the settings_schema.json and settings_data.json files

Problem

When downloading an existing theme from a store, the contents of /config will be compressed, reducing their readability. It would be great if as part of the migrate command, these files could be uncompressed, to make them easy to work with.

Scope

Most visible as part of slate migrate, but may involve modification to slate-tools.

Replication steps

  1. Download an existing theme from Shopify
  2. Open config/settings_data.json

More Information

Current workaround during dev is to open the settings_*.json files in the admin-based web editor for the theme you're working on, where they'll be shown uncompressed, and copy/paste into your local versions of those files.

Intermittent issue with CSS on first deploy

Problem

I've run into an issue several times today using slate start on some of Shopify's themes.

The CSS sometimes has different values for fonts, colours, etc. These values didn't correspond to any values in existing presets in the theme I was building at the time.

The issue looks like this (this example is using Simple):

https://screenshot.click/2017-04-20_15-31-08.png

Here's a diffcheck of the uglified CSS for each of the above instances.

It could be that values from settings_data.json from the previous theme are being used/not replaced correctly.

Scope

I only saw it while running slate start, but haven't tried to reproduce using slate deploy on its own for example.

Replication steps

  1. Use slate's tools to deploy a theme to a test store.
  2. Use slate start to build and deploy a second, different Shopify theme to the same theme_id on the same store.
  3. Inspect the contents of the main CSS file and compare it with the expected contents.

Transfer failed: File(s) failed to upload to store.

Problem

Every time I save a file it fails to upload it. I am met with the error:

[15:24:54] change in src/sections - change product.liquid
[15:24:54] running task - build:assets
[15:24:54] sections/product.liquid 4.8 kB
[15:24:54] change in sections - change product.liquid
[15:24:54] Initiating deploy to development
[15:24:55] running task [child process] - theme upload
[15:24:55] Transfer Failed: File(s) failed to upload to store. See log notes above.
[15:24:55] change in src/sections - change product.liquid
[15:24:55] running task - build:assets
[15:24:56] sections/product.liquid 4.8 kB
[15:24:56] change in sections - change product.liquid
[15:24:56] Initiating deploy to development
[15:24:56] running task [child process] - theme upload
[15:24:56] Transfer Failed: File(s) failed to upload to store. See log notes above.

Scope

While the error occurs due to something probably wrong in my theme files, the error message is probably something that should be fixed in the slate-cli.

It says "See log notes above." on the last line however there are no helpful log notes as to what failed or why it failed.

Replication steps

This problem occurred after I created a git repo of my theme and pushed all the files to git. I've tried ignoring all .git/ files via the config.yml but the issue persists. Possibly not related to git?

`slate new theme` includes repodb.yml in target directory

~/Development/slate_test/Funky
❯ ls -al
total 120
drwxr-xr-x   20 davidcornu  staff    680 15 Aug 17:13 .
drwxr-xr-x    3 davidcornu  staff    102 15 Aug 17:12 ..
-rw-r--r--    1 davidcornu  staff     71 15 Aug 17:12 .eslintignore
-rw-r--r--    1 davidcornu  staff    337 15 Aug 17:12 .eslintrc.yml
-rw-r--r--    1 davidcornu  staff    602 15 Aug 17:12 .gitignore
-rw-r--r--    1 davidcornu  staff   1789 15 Aug 17:12 .scss-lint.yml
-rw-r--r--    1 davidcornu  staff     93 15 Aug 17:12 .yo-rc.json
-rw-r--r--    1 davidcornu  staff    138 15 Aug 17:12 Gemfile
-rw-r--r--    1 davidcornu  staff    921 15 Aug 17:12 Gemfile.lock
-rw-r--r--    1 davidcornu  staff   1079 15 Aug 17:12 LICENSE
-rw-r--r--    1 davidcornu  staff   4853 15 Aug 17:12 README.md
-rw-r--r--    1 davidcornu  staff    664 15 Aug 17:12 circle.yml
-rw-r--r--    1 davidcornu  staff    624 15 Aug 17:12 config.yml
-rw-r--r--    1 davidcornu  staff   3681 15 Aug 17:12 gulpfile.js
drwxr-xr-x  609 davidcornu  staff  20706 15 Aug 17:13 node_modules
-rw-r--r--    1 davidcornu  staff   1309 15 Aug 17:12 package.json
-rw-r--r--    1 davidcornu  staff    112 15 Aug 17:12 repodb.yml 👈
drwxr-xr-x    5 davidcornu  staff    170 15 Aug 17:12 spec
drwxr-xr-x   11 davidcornu  staff    374 15 Aug 17:12 src
drwxr-xr-x   16 davidcornu  staff    544 15 Aug 17:12 tasks

CLI commands fail for requireDir on Node v8

Problem

There is a reported issue with Slate where requireDir fails on Node v8. Shopify/slate#170

/Users/justin/Sites/Shopify/theme-name/node_modules/require-dir/index.js:97
            if (!require.extensions.hasOwnProperty(ext)) {
                                    ^

TypeError: require.extensions.hasOwnProperty is not a function
    at requireDir (/Users/justin/Sites/Shopify/theme-name/node_modules/require-dir/index.js:97:37)
    at Object.<anonymous> (/Users/justin/Sites/Shopify/augies-shopify/node_modules/@shopify/slate-tools/lib/gulpfile.js:39:1)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Liftoff.handleArguments (/Users/justin/Sites/Shopify/augies-shopify/node_modules/gulp/bin/gulp.js:116:3)

Scope

This is related to all commands for Slate. slate watch, slate start, and state zip.

Replication steps

  1. Upgrade to Node v8.0.0 and NPM 5.0.1
  2. Clean install Slate CLI npm install -g @shopify/slate
  3. Initialize a new theme using Slate slate theme new-theme
  4. Run slate watch or slate start or slate zip
  5. Error occurs

More Information

Reference issue first referenced under Slate repo

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.