Skip to content
This repository was archived by the owner on Sep 15, 2023. It is now read-only.

Commit 1abc5d2

Browse files
committed
Merge pull request #74 from branch 'documentation-updates'
2 parents 6a29c48 + bd22e26 commit 1abc5d2

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# ![Blendid](https://raw.githubusercontent.com/vigetlabs/blendid/master/extras/blendid-logo.png)
1+
# ![Blendid](https://raw.githubusercontent.com/vigetlabs/blendid/master/blendid-logo.png)
22

33
[![Build Status](https://travis-ci.org/vigetlabs/blendid.svg?branch=static-server)](https://travis-ci.org/vigetlabs/blendid)
44
[![Stories in Ready](https://badge.waffle.io/vigetlabs/blendid.png?label=ready&title=Ready)](https://waffle.io/vigetlabs/blendid)
55

6-
**Blendid** *(formerly known as Gulp Starter)* is a delicious stand-alone blend of tasks and build tools poured into [Gulp](http://gulpjs.com/) to form a full-featured modern asset pipeline. It can be used as-is as a static site builder, or can be configured and integrated into your own development environment and site or app structure.
6+
**Blendid** is a delicious stand-alone blend of tasks and build tools poured together as a full-featured modern asset pipeline. It can be used as-is as a static site builder, or can be configured and integrated into your own development environment and site or app structure.
77

88
## Quick start on a fresh project (empty directory)
99
```bash
1010
yarn init
1111
yarn add blendid
12-
yarn run blendid -- init
12+
yarn run blendid init
1313
yarn run blendid
1414
```
1515

blendid-logo.png

3.6 KB
Loading

extras/blendid-logo.png

-5.52 KB
Binary file not shown.

extras/docker/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Gulp Starter on Docker
1+
# Blendid on Docker
22

3-
This extra allows you to run gulp-starter in a Docker container. You can use the included development server, or use Docker to manage assets for another server environment, which may or may not also use Docker.
3+
This extra allows you to run Blendid in a Docker container. You can use the included development server, or use Docker to manage assets for another server environment, which may or may not also use Docker.
44

55
## Requirements
66

@@ -10,7 +10,7 @@ Requires [Docker](https://www.docker.com/products/overview), naturally.
1010

1111
### In development
1212
```bash
13-
git clone https://github.com/vigetlabs/gulp-starter.git MyApp
13+
git clone https://github.com/vigetlabs/blendid.git MyApp
1414
cd MyApp
1515
cp ./extras/docker/Dockerfile .
1616
cp ./extras/docker/.dockerignore .
@@ -26,10 +26,10 @@ Browse to [http://localhost:3000](http://localhost:3000).
2626

2727
### As part of an automated build
2828
```bash
29-
docker run --rm myrepo/myimage:mytag npm run gulp production
29+
docker run --rm myrepo/myimage:mytag yarn run blendid build
3030
```
3131

32-
If you want to use this to process front-end assets for a different server environment, you can do that too. In the Browsersync section of [config.json](https://github.com/davidham/gulp-starter/blob/master/gulpfile.js/config.json), set Browsersync to proxy your app server. Here's an example pointing at a Rails app:
32+
If you want to use this to process front-end assets for a different server environment, you can do that too. In the Browsersync section of [config.json](https://github.com/vigetlabs/blendid/blob/master/gulpfile.js/task-config.json), set Browsersync to proxy your app server. Here's an example pointing at a Rails app:
3333

3434
```json
3535
"browserSync": {

extras/rails/ASSETS-README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Gulp Starter on Rails
1+
# Blendid on Rails
22
```bash
3-
yarn run blendid -- init-rails
3+
yarn run blendid init-rails
44
```
55

6-
Using gulp-starter with Rails (instead of the built in asset pipeline) is actually pretty easy. This directory contains the extra pieces that get put in place by the `init-rails` task.
6+
Using Blendid with Rails (instead of the built in asset pipeline) is actually pretty easy. This directory contains the extra pieces that get put in place by the `init-rails` task.
77

88
## Overview
9-
Firstly, note that we're going to leave the existing asset pipeline in place. Many gems rely on it (e.g, Active Admin), and it's a good idea to keep it around. That said, it's important to keep it separated. We won't be mixing gulp-generated assets with rails generated ones.
9+
Firstly, note that we're going to leave the existing asset pipeline in place. Many gems rely on it (e.g, Active Admin), and it's a good idea to keep it around. That said, it's important to keep it separated. We won't be mixing Blendid-generated assets with Rb-generated ones.
1010

1111
Source files should be in a `src` directory in the root of the project, **not** in `app/assets`. You'll also no longer be using the built in Rails asset helpers like `javascript_include_tag` and the like. Instead, you'll use a set of **blendid_asset_helpers** with regular markup.
1212

1313
#### app/helpers/blendid_asset_helper.rb
14-
In production (`yarn run blendid -- build`), filenames get hashed so you can cache them forever. When the file or any of it's referenced assets changes, the hash changes. This works just like the Rails asset pipeline, and we have similar helpers to ensure that the correct filenames are referenced in production:
14+
In production (`yarn run blendid build`), filenames get hashed so you can cache them forever. When the file or any of it's referenced assets changes, the hash changes. This works just like the Rails asset pipeline, and we have similar helpers to ensure that the correct filenames are referenced in production:
1515

1616
```ruby
1717
blendid_asset_path('image/asset.jpg') # -> /image/logo-n39o4orb81.png
@@ -34,7 +34,7 @@ You would do this:
3434
##### Sprite helper
3535
There's also a `<%= icon 'id' %>` helper included for rendering svg icons generated from the `svgSpriteTask` task. Modify as needed.
3636

37-
#### config/initializers/gulp.rb
37+
#### config/initializers/blendid.rb
3838
The asset path helpers check for the existence a rev-manifest.json file, generated by the `build` tasks. It may look something like this:
3939

4040
```json
@@ -54,14 +54,14 @@ For things like Active Admin that rely on the asset pipeline (Sprockets), contin
5454

5555
In some cases, this means you may have two JS files on your page. One containing *only* your gem-installed assets, and one for your bundles compiled with webpack. I try to avoid using gem assets where possible though, and usually just have my webpack bundle on the page.
5656

57-
You may be thinking, "couldn't you still bundle them together, either by including Gulp complied files in the sprockets manifest, or vice versa?" The answer is, yes, technically, but we've been down that road, and it's not a good one to travel. Trust me on this—it's better to keep them separate.
57+
You may be thinking, "couldn't you still bundle them together, either by including Blendid-compiled files in the sprockets manifest, or vice versa?" The answer is, yes, technically, but we've been down that road, and it's not a good one to travel. Trust me on this—it's better to keep them separate.
5858

5959

6060
## Deploying
6161
### Heroku
6262
Heroku makes deploying SUPER easy, but there are a couple of things you'll need to do to get this running.
6363

64-
Since we're using Ruby (to run Rails) AND Node (to compile our assets with Gulp) in our setup, we need both running on our server. Heroku will automatically detect ONE of these at a time based on the presence of a `Gemfile` or `package.json`, but to get both running simultaneously, we need to [specifiy heroku-buildback-multi as your buildpack](https://github.com/ddollar/heroku-buildpack-multi). This enables us to specify multiple custom buildpacks in a `.buildpacks` file.
64+
Since we're using Ruby (to run Rails) AND Node (to compile our assets with Blendid) in our setup, we need both running on our server. Heroku will automatically detect ONE of these at a time based on the presence of a `Gemfile` or `package.json`, but to get both running simultaneously, we need to [specifiy heroku-buildback-multi as your buildpack](https://github.com/ddollar/heroku-buildpack-multi). This enables us to specify multiple custom buildpacks in a `.buildpacks` file.
6565
```
6666
https://github.com/heroku/heroku-buildpack-nodejs.git
6767
https://github.com/orlando/heroku-buildpack-ruby.git
@@ -84,7 +84,7 @@ Take note of the following:
8484
Heroku requires `config.serve_static_files` to be enabled, so be sure to either add `RAILS_SERVE_STATIC_FILES` as a config var in your Heroku settings, or manually set this to true in your `production.rb` file.
8585

8686
#### A note on devDependencies
87-
You'll either need to make sure all dependencies accessed during the production gulp task are included in `dependencies` rather than `devDependencies` or do the following:
87+
You'll either need to make sure all dependencies accessed during the Blendid build task are included in `dependencies` rather than `devDependencies` or do the following:
8888

8989
> Npm reads configuration from any environment variables beginning with NPM_CONFIG. We set production=true by default to install dependencies only. If you would like to install additional devDependencies, you can disable this behavior:
9090
```

extras/rails/app/helpers/blendid_asset_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def blendid_asset_path(path, type = nil)
33
root = ASSET_PATH_CONFIG['dest'].gsub(/(.*)public\//, '/')
44
asset_path = type ? File.join(ASSET_PATH_CONFIG[type]['dest'], path) : path
55
if rev_manifest
6-
raise "#{asset_path} not found in rev_manifest.json. Fix path or try rebuilding with `yarn run blendid -- build` from `/client_side`." if rev_manifest[asset_path].nil?
6+
raise "#{asset_path} not found in rev_manifest.json. Fix path or try rebuilding with `yarn run blendid build` from `/client_side`." if rev_manifest[asset_path].nil?
77
asset_path = rev_manifest[asset_path]
88
end
99
File.absolute_path(File.join(root, asset_path), '/')

extras/rails/config/deploy.rb.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ before "deploy:assets:precompile", "deploy:blendid_build"
44
namespace :deploy do
55
desc "Install front end dependencies and compile for production with Blendid"
66
task :blendid_build do
7-
invoke_command "bash -c '. /home/deploy/.nvm/nvm.sh && cd #{release_path} && yarn install && yarn run blendid -- build'"
7+
invoke_command "bash -c '. /home/deploy/.nvm/nvm.sh && cd #{release_path} && yarn install && yarn run blendid build'"
88
end
99
end

extras/shopify/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Gulp Shopify Upload Task
1+
# Blendid Shopify Upload Task
22

3-
Using gulp-starter with Shopify creates a simple workflow that makes iteration loops fairly tight. This directory contains the extra pieces you'll need to get going.
3+
Using Blendid with Shopify creates a simple workflow that makes iteration loops fairly tight. This directory contains the extra pieces you'll need to get going.
44

55
## Overview
66

@@ -22,17 +22,17 @@ myproject
2222

2323
npm install gulp-shopify-upload --save-dev
2424

25-
#### Gulp Tasks
25+
#### Tasks
2626

27-
This example contains two gulp tasks: `shopifywatch` and `shopifydeploy` defined in `gulpfile.js/tasks/shopify.js`. The watch task starts a watching process that monitors at all Shopify directories and uploads saved files (whether they have changed or not). The deploy task simply deploys all files at once.
27+
This example contains two tasks: `shopifywatch` and `shopifydeploy` defined in `gulpfile.js/tasks/shopify.js`. The watch task starts a watching process that monitors at all Shopify directories and uploads saved files (whether they have changed or not). The deploy task simply deploys all files at once.
2828

29-
Not depicted in this example is the integration of these gulp tasks with your configured task pipelines. It is up to you to add `shopifywatch` to a list of tasks executed during development, and `shopifydeploy` to a deploy task.
29+
Not depicted in this example is the integration of these tasks with your configured task pipelines. It is up to you to add `shopifywatch` to a list of tasks executed during development, and `shopifydeploy` to a deploy task.
3030

3131
**One Caveat**: It is true that, during development, you will actually be deploying (uploading) files to the Shopify server that holds your theme files, overwriting what's there. Keep this in mind! Always develop against a test theme on a dev Shopify project and if you're working with a team, take care not to overwrite eachother's work.
3232

3333
#### API Credentials
3434

35-
In order to upload files, the gulp plugin requires your store's API key and API password, along with the store URL. As you can see in `.gitignore`, it is recommended that you ignore the file with the credentials filled in, and only store the example file in source control. Here's the procedure for setting this up (you probably want to include these instructions in _your_ project's README).
35+
Uploading files requires your store's API key and API password, along with the store URL. As you can see in `.gitignore`, it is recommended that you ignore the file with the credentials filled in, and only store the example file in source control. Here's the procedure for setting this up (you probably want to include these instructions in _your_ project's README).
3636

3737
1. Copy `shopify_api.json.example` and rename it to `shopify_api.json` in the root directory of your project
3838
2. Fill in the fields with your store's information

extras/tasks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Gulp Server Task
1+
## Blendid Server Task
22
This will start a static server that serves your production files to `http://localhost:5000`. This is primarily meant as a way to preview your production build locally, not necessarily for use as a live production server.
33

44
Addtional `devDependencies` needed:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "blendid",
33
"version": "4.4.2",
4-
"description": "(formerly gulp-starter) A full featured configurable gulp asset pipeline and static site builder",
4+
"description": "A full featured configurable asset pipeline and static site builder",
55
"license": "MIT",
66
"engines": {
77
"node": ">=6.11.1",

0 commit comments

Comments
 (0)