don
September 26, 2017, 8:13pm
1
Hello folks, this might be a very simple question but I am a rookie (so apologies if this is a dumb question) . In the sage9 workflow, whats the difference between the commands yarn build and yarn build:production ?
And if I am using sage9 without Trellis or Bedrock, whats the correct way to deploy the theme in to production? I have managed to find couple of tutorials but they all work with trellis and bedrock. If somebody can pass me a link much appreciated!
Re: yarn, follow isProduction
at:
const path = require('path');
const { argv } = require('yargs');
const merge = require('webpack-merge');
const desire = require('./util/desire');
const userConfig = merge(desire(`${__dirname}/../config`), desire(`${__dirname}/../config-local`));
const isProduction = !!((argv.env && argv.env.production) || argv.p);
const rootPath = (userConfig.paths && userConfig.paths.root)
? userConfig.paths.root
: process.cwd();
const config = merge({
open: true,
copy: 'images/**/*',
proxyUrl: 'http://localhost:3000',
cacheBusting: '[name]_[hash]',
paths: {
For theme deployments, a service like http://deploybot.com/ , https://buddy.works/ , or https://www.springloops.io/ might be what you’re after.
1 Like
don
September 27, 2017, 12:34am
3
I thought sage9 documentation is yet to be developed. But found my answer in here. Sorry for the trouble folks! Thanks!
---
ID: 5322
post_title: Theme Development and Building
author: Ben Word
post_date: 2015-09-01 18:19:21
post_excerpt: ""
layout: doc
permalink: >
https://roots.io/sage/docs/theme-development-and-building/
published: true
---
<p class="lead">These are the primary projects that make up the Sage workflow:</p>
<ul class="lead">
<li><h4><a href="https://webpack.github.io/">Webpack</a></h4><p><small>is used as a build tool for compiling stylesheets, checking for JavaScript errors, optimizing images, and concatenating and minifying files. In previous versions of the theme we used Grunt and Gulp as our build tools.</small></p></li>
<li><h4><a href="https://www.npmjs.com/">npm</a></h4><p><small>npm is a front-end package manager. Sage uses npm to pull in Bootstrap and jQuery as dependencies. In previous versions of the theme we used Bower as our front-end package manager.</small></p></li>
<li><h4><a href="http://www.browsersync.io">BrowserSync</a> with Webpack Hot Module Replacement</h4><p><small>BrowserSync with WHR keeps multiple browsers and devices synchronized while developing, along with injecting updated CSS and JS. In previous versions of the theme we used LiveReload for injecting assets.</small></p></li>
</ul>
<div class="cta-product cta-product-sage well well-sage module"><a href="https://roots.io/books/theme-development-with-sage/" class="media"><div class="media-left"><img class="media-object" src="/app/uploads/theme-development-with-sage-cover-800x1035.png" alt="Sage book cover"></div><div class="media-body"><h4><span class="badge bg-white text-sage">Get the book</span> <br> <span class="text-sage">Theme Development with Sage</span></h4><p class="lead">A step-by-step guide to setting up a custom Sage starter theme.</p><p class="visible-md visible-lg">Build well organized & easily maintained WordPress themes using a modern web development workflow.</p><p class="text-right"><button class="btn btn-primary">Buy</button></p></div></a></div>
This file has been truncated. show original