This repository was archived by the owner on Jul 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor for node-themekit * testing themekit module * remove slate setup and update deps * update to scoped themekit * fix eslint version * remove unused deps and unnecessary promises
- Loading branch information
Ryan Macdonald
authored and
Thomas Kelly
committed
Jul 31, 2017
1 parent
737985a
commit 027158f
Showing
14 changed files
with
530 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ rules: | |
spaced-comment: 0 | ||
no-process-env: 0 | ||
indent: ["error", 2, {"SwitchCase": 1}] | ||
globals: | ||
Promise: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,6 @@ Clone the latest version of Slate CLI to your local machine using SSH | |
git clone [email protected]:Shopify/slate-cli.git | ||
``` | ||
|
||
|
||
|
||
#### 2. Run npm link | ||
```shell | ||
cd slate-cli | ||
|
@@ -38,14 +36,6 @@ a symbolic link to your global npm directory. | |
You should now be able to run slate from your terminal. Try running `slate -v` to verify that everything worked | ||
(if this didn't work, see [Troubleshooting](#troubleshooting) for guidance). | ||
|
||
#### 3. Run slate setup | ||
|
||
```shell | ||
slate setup | ||
``` | ||
|
||
This command installs [ThemeKit](http://themekit.cat) and other non-node dependencies. More details [here](#setup). | ||
|
||
## Getting started | ||
|
||
#### 1. Create a new project | ||
|
@@ -101,8 +91,7 @@ You're ready to start developing with Slate. To get started, run the following | |
|
||
1. Pull the latest version from GitHub - Make sure that your current branch is master and that your master branch is up-to-date. | ||
2. Run `npm update` - This will update all project dependencies and developer tools listed in the [package.json](package.json) file. | ||
3. Run `slate setup` - This installs project-specific dependencies and developer tools. More details [here](#setup). | ||
4. Run `npm prune` and `npm install` (optional) - After major changes, it may be necessary to clean out your `node_modules` and | ||
3. Run `npm prune` and `npm install` (optional) - After major changes, it may be necessary to clean out your `node_modules` and | ||
make sure that new modules have been correctly installed. | ||
|
||
This will remove any unused dependencies from `node_modules` and install all new dependencies. | ||
|
@@ -111,19 +100,11 @@ make sure that new modules have been correctly installed. | |
|
||
Command | Usage | ||
--- | --- | ||
[setup](#setup) | `slate setup` | ||
[new theme](#new-theme) | `slate new theme [name]` | ||
[new section](#new-section) | `slate new section [name]` | ||
[help](#help) | `slate -h` | ||
[version](#version) | `slate -v` | ||
|
||
### setup | ||
``` | ||
slate setup | ||
``` | ||
|
||
Installs [Theme Kit](http://themekit.cat/), a cross-platform tool which provides utilities that allow you to interact with Shopify themes. | ||
|
||
### new theme | ||
``` | ||
slate new theme [name] | ||
|
@@ -239,7 +220,6 @@ If you encounter any issues, here are some preliminary steps to take: | |
|
||
- `git pull` latest version of Slate CLI. | ||
- `npm install` to make sure you have all the dependencies. | ||
- `slate setup` to make sure all Slate CLI dependencies are installed. | ||
- `npm link` to make sure that the symlink exists and Slate CLI is globally installed. | ||
|
||
## License | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ dependencies: | |
test: | ||
override: | ||
- npm run lint | ||
- slate setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
var themekit = require('../includes/themekit.js'); | ||
var command = require('@shopify/themekit').command; | ||
|
||
module.exports = { | ||
command: function(args, options) { | ||
if (options.environment) { | ||
return themekit.commands(['replace', '-env', options.environment].concat(args)); | ||
return new Promise(function(resolve, reject) { | ||
command({ | ||
args: ['replace', '-env', options.environment].concat(args) | ||
}, function(err) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
} else { | ||
return themekit.commands(['replace'].concat(args)); | ||
return new Promise(function(resolve, reject) { | ||
command({ | ||
args: ['replace'].concat(args) | ||
}, function(err) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
} | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.