Sha256: 7ae9ef205f0693495da329085837e772739c1d5c9945ce0b3078215925171757
Contents?: true
Size: 1.53 KB
Versions: 3
Compression:
Stored size: 1.53 KB
Contents
# encoding: UTF-8 # Install webpacker current_dir = File.dirname(__FILE__) copy_file "#{current_dir}/config/webpacker.yml", "config/webpacker.yml" puts "Copying webpack core config and loaders" directory "#{current_dir}/config/webpack", "config/webpack" directory "#{current_dir}/config/loaders/core", "config/webpack/loaders" puts "Copying .postcssrc.yml to app root directory" copy_file "#{current_dir}/config/.postcssrc.yml", ".postcssrc.yml" puts "Copying .babelrc to app root directory" copy_file "#{current_dir}/config/.babelrc", ".babelrc" puts "Creating javascript app source directory" directory "#{current_dir}/javascript", "#{Webpacker::Configuration.source}" puts "Copying binstubs" directory "#{current_dir}/bin", "bin" chmod "bin", 0755 & ~File.umask, verbose: false if File.exists?(".gitignore") append_to_file ".gitignore", <<-EOS /public/packs /node_modules EOS end puts "Installing all JavaScript dependencies" run "yarn add webpack webpack-merge js-yaml path-complete-extname " \ "webpack-manifest-plugin babel-loader@7.x coffee-loader coffee-script " \ "babel-core babel-preset-env babel-polyfill compression-webpack-plugin rails-erb-loader glob " \ "extract-text-webpack-plugin node-sass file-loader sass-loader css-loader style-loader " \ "postcss-loader postcss-cssnext postcss-smart-import resolve-url-loader " \ "babel-plugin-syntax-dynamic-import babel-plugin-transform-class-properties" puts "Installing dev server for live reloading" run "yarn add --dev webpack-dev-server" puts "Webpacker successfully installed 🎉 🍰"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
webpacker-legacy-0.1.2 | lib/install/template.rb |
webpacker-legacy-0.1.1 | lib/install/template.rb |
webpacker-legacy-0.1.0 | lib/install/template.rb |