deploy: minify JS assets on production
This commit is contained in:
parent
7c58d7c82e
commit
a0600fb49e
3 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
DEPLOY_HOSTNAME=
|
||||
DEPLOY_USERNAME=
|
||||
DEPLOY_PATH=
|
||||
NODE_ENV=
|
||||
|
|
15
Rakefile.rb
15
Rakefile.rb
|
@ -24,14 +24,23 @@ task server: ["nanoc:compile"] do
|
|||
end
|
||||
|
||||
namespace :deploy do
|
||||
task local: ["nanoc:compile"] do
|
||||
task local: ["env:development", "nanoc:compile"] do
|
||||
Deploy::Local.call
|
||||
end
|
||||
|
||||
task remote: ["nanoc:clean", "nanoc:compile"] do
|
||||
task remote: ["env:production", "nanoc:clean", "nanoc:compile"] do
|
||||
Deploy::Remote.call
|
||||
end
|
||||
end
|
||||
|
||||
namespace :env do
|
||||
task :production do
|
||||
require "dotenv"
|
||||
Dotenv.load
|
||||
Deploy::Remote.call
|
||||
end
|
||||
|
||||
task :development do
|
||||
ENV["NODE_ENV"] ||= "development"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
const path = require('path');
|
||||
const process = require('process');
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
mode: process.env.NODE_ENV || "development",
|
||||
experiments: {
|
||||
asyncWebAssembly: true
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue