Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

Can't copy minified js directory over to publish #161

Open
grayghostvisuals opened this issue May 19, 2013 · 2 comments
Open

Can't copy minified js directory over to publish #161

grayghostvisuals opened this issue May 19, 2013 · 2 comments

Comments

@grayghostvisuals
Copy link

I may have a unique case or maybe not. I've included a screen shot of my text editor with the directory tree on the left. Only trouble I'm running into is that my minified directory for JS won't copy over to the publish directory created by ant. I use Codekit for minifying my JS so I don't need ant to do that for me. Hopefully this is a setting I'm missing or something.

ant project.properties file

# V1.0
# project.properties file defines overrides for default.properties
# Explanation: This file should be created by each user as and when he or she needs to override particular values.
# Consequently, it should not be placed under version control.
#---------------------------------------#
# HTML                                  #  
#---------------------------------------#
# These are the pages (files) that will be served to users (.html, .php, .asp, etc). Files in this property will
# be minified / optimised and have any stylesheet or javascript references updated to the minified examples
#
# The paths need to be relative
#
# Files can be added in a comma separated form
file.pages        = index.php, missing.html
##
# Root page file
# The <script> tags between the magic comments in this page
#     <!-- //-beg- concat_js -->
#    <script src="js/plugins.js"></script>
#    <script src="js/main.js"></script>
#    <!-- //-end- concat_js -->
# determine the ordered list of scripts to be concatenated, minified,
# and swapped with file.root.script in all the pages.
# file.root.page      = index.html
# htmlcompressor Options
# Override default htmlcompressor options
# HTML Compressor documentation http://code.google.com/p/htmlcompressor/
# tool.htmlcompressor.opts    = --remove-quotes --preserve-multi-spaces --compress-css --preserve-php --preserve-ssi
# Add optional htmlcompressor options
#
tool.htmlcompressor.opts.extra = --preserve-php
#---------------------------------------#
# Stylesheets                           #  
#---------------------------------------#
# Note: Stylesheets will be concatenated in the order they are listed in the file.stylesheets property (i.e. the last
# file listed will be at the end of the concatenated file), so it probably makes sense to have the main style.css file
# as the first entry
#
# NOTE: avoid adding spaces after the comma unless your file name has spaces (which you should probably consider not using anyway)
#
# Example:
# file.stylesheets  = style.css,lightbox.css,plugin.css
#
file.stylesheets  =
##
# LESS CSS Processing (http://lesscss.org)
#
# You must tell the script if you want to process your CSS as LESS
# build.css.less            = true
#
# You must also set your LESS css file as the root CSS file
#
# Example:
# file.root.stylesheet    = style.less
##
# SASS (SCSS) CSS Processing (http://sass-lang.com)
#
# You must tell the script if you want to process your CSS as SCSS
# build.css.scss            = true
#
# You must also set your SCSS css file as the root CSS file
#
# Example:
# file.root.stylesheet    = style.scss
##
# Override default CSSLint Options (see http://csslint.net/about.html#settings for description of options)
# tool.csslint.opts =
#---------------------------------------#
# Directories                           #  
#---------------------------------------#
# Excluded files and dirs
#
# Add any files or directories you add to the project and do not want to be copied to the publish directory as a
# comma separated list
# These files are ignored in addition to the default ones specified in default.properties.
# Example: file.exclude = badfolder/**
file.exclude      = new0513/scss/**.scss, new0513/scss/partials/**.scss, .sass-cache/**, new0513/js/libs/**, dandelion.yml, new0513/.bowerrc, new0513/.editorconfig, new0513/component.json, config.rb, codekit-config.json
##
# Directory Structure
#
# Override any directory paths specific to this project
#
# dir.source          = .
dir.intermediate    = intermediate
dir.publish         = publish
dir.build           = build
# dir.build.tools     = ${dir.build}/tools
# dir.jsdoc           = ${dir.build.tools}/jsdoc3
# dir.test            = test
# dir.demo            = demo
dir.js              = new0513/js/minified/
dir.js.main         = ${dir.js}/js/minified/
# scripts in the lib directory will only be minified, not concatenated together
# dir.js.libs         = ${dir.js}/vendor
# this is identical to the 'libs' in dir.js.libs but just an easier reference when you dont need the full path
# slug.libs           = vendor
# scripts in the modules directory will be minified, not concatenated, but will be cachebusted
dir.js.modules    = ${dir.js}/minified
# this is identical to the 'modules' in dir.js.modules but just an easier reference when you dont need the full path
# slug.modules    = modules
dir.css             = new0513/css0513
# dir.docs            = docs
#---------------------------------------#
# Javascript                            #  
#---------------------------------------#
# Bypassed JavaScript files and dirs
#
# Add any files or folders within the js directory that you want to be copied to the publish directory as a
# comma separated list
# These files will not be concatenated or minimized and will simply be copied over as is.
# Note: you cannot declare an empty file.bypass property
# Example:
file.js.bypass = new0513/js/minified/main-min.js
# file.js.bypass =
# 
## 
# Closure Compiler Options
# options are WHITESPACE_ONLY, SIMPLE_OPTIMIZATIONS, ADVANCED_OPTIMIZATIONS
# scripts.compilation.level =  SIMPLE_OPTIMIZATIONS
# options are QUIET DEFAULT AND VERBOSE
# scripts.compilation.warninglevel = QUIET
##
# Override default JSHint Options (see http://jshint.com/ for description of options)
# tool.jshint.opts =
##
# Override default JSLint Options (see http://www.jslint.com/lint.html for description of options)
# tool.jslint.opts =
##
# uncomment to enable inline JavaScript compression. For now we've disabled it to protect against errors generated with template script tags.
# tool.htmlcompressor.javascript = --compress-js
##
# Optional property used to determine whether to include requirejs' implementation of <script> in the build process
# Uncomment and include the path
# Example: script.require.path = js/libs/require-jquery.js
# script.require.path =# You can set multiple directories here, e.g: img, css/img# dir.images          = img, css/img
##
# uncomment to set async and/or defer attributes on your scripts
# scripts.async = async
# scripts.defer = defer
#
#---------------------------------------#
# Build                                 #  
#---------------------------------------#
#
# Specify an environment to build
#
# By Default, it builds a production environment
# Set to dev if building a development environment
# Set to test if building a test environment
env               =
##
# set the hash length used for versioning css and js files.
# valid values are between 1 and 40.
# shorter values use less bytes at the expense of increasing the probability of a hash collision.
# hash.length = 7
##
# concat tokens 
# build.jstoken = concat_js
#---------------------------------------#
# Images                                #  
#---------------------------------------#
#
# Bypass Optimization for these image files or folders
#
# images.bypass
# If set, these images will not be optimized
# Note: you cannot declare an empty images.bypass property, it would exclude the entire img folder from being optimized
##
# Rev Image Filenames within the main stylesheet
# defaults to true
css.rev.images = false
## 
# Rev Image Filenames within the HTML files.
# defaults to false
html.rev.images = true
##
# You can set multiple directories here, e.g: img, css/img
dir.images          = new0513/img
##
# Image Optimisation
#
# images.strip.metadata       = true
# Seting this to true will strip the metadata from all jpeg and png files.
# YOU SHOULD ONLY DO THIS IF YOU OWN THE COPYRIGHT TO ALL THE IMAGES IN THE BUILD
##
# uncomment this to enable progressive jpg conversion using jpegtran
# images.opts.progressive = -progressive
#---------------------------------------#
# Misc                                  #  
#---------------------------------------#
# Compatibility with older versions of html5boilerplate
# recently js/libs was changed to js/vendor and the main JS file was changed to main.js
# uncomment these lines to support the old file structure
# dir.js.libs = ${dir.js}/libs
# file.root.script = script.js
# slug.libs = libs
##
# Override default jsdoc3 options
#tool.jsdoc3.opts                       = --template templates/default
##
# https://github.com/h5bp/ant-build-script/wiki/Setting-up-the-Qunit-task-for-use-with-Jenkins
# the path to your phantomjs binary. It should live in ${dir.build.tools}
# tool.phantomJS = phantomjs-1.8.1-windows/phantomjs.exe
# the location of qunit.js for PhantomJS
# tool.qunit.js = qunit-1.11.0.js
# the name of your qunit-runner.js file for PhantomJS
# tool.qunitrunner.js = qunit-runner.js
# the location of your tests
# dir.tests           = tests
##
# JSDOC3 Documentation (https://github.com/jsdoc3/jsdoc)
# You must tell the script if you want to build documentation
# build.jsdoc3      = true
#

screen shot 2013-05-19 at 7 23 07 pm

@roblarsen
Copy link
Member

I think you'll have to manually edit the build script. I'll try to do a little research to show what you might need to edit, but the minification and concatenation workflow for the scripts is actually involved.

@grayghostvisuals
Copy link
Author

Cool thanks. It would be sweet not to have ant do any of the script jazz for me. There's also times when I use grunt for JS optimizing instead of Codekit and I would prefer to keep ant out of this as much as possible. Thanks again for looking into this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants