mirror of
https://github.com/twbs/bootstrap-sass.git
synced 2022-11-09 12:27:02 -05:00
Update node.js devDeps, tests, new mincer compat
This commit is contained in:
parent
47819e892f
commit
7097cf5572
6 changed files with 14 additions and 15 deletions
|
@ -18,5 +18,4 @@ env:
|
|||
global:
|
||||
- VERBOSE=1
|
||||
script:
|
||||
- bundle exec rake
|
||||
- sh test/*.sh
|
||||
bundle exec rake && sh test/*.sh
|
||||
|
|
7
Rakefile
7
Rakefile
|
@ -4,9 +4,10 @@ $:.unshift(lib_path) unless $:.include?(lib_path)
|
|||
load './tasks/bower.rake'
|
||||
|
||||
require 'rake/testtask'
|
||||
task :test do |t|
|
||||
$: << File.expand_path('test/')
|
||||
Dir.glob('./test/**/*_test.rb').each { |file| require file }
|
||||
Rake::TestTask.new do |t|
|
||||
t.libs << 'test'
|
||||
t.test_files = FileList['test/**/*_test.rb']
|
||||
t.verbose = true
|
||||
end
|
||||
|
||||
desc 'Dumps output to a CSS file for testing'
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
// from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
|
||||
// from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
|
||||
// or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
|
||||
@return "<%- asset_path('#{$path}'.replace(/[#?].*$/, '')) + '#{$path}'.replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
|
||||
@return "<%- asset_path("#{$path}".replace(/[#?].*$/, '')) + "#{$path}".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
|
||||
}
|
||||
|
||||
@function twbs-image-path($file) {
|
||||
@return "<%- asset_path('#{$file}') %>";
|
||||
@return "<%- asset_path("#{$file}") %>";
|
||||
}
|
||||
|
||||
$bootstrap-sass-asset-helper: true;
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
"url": "https://github.com/twbs/bootstrap-sass/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"node-sass": "~2.0",
|
||||
"mincer": "~1.2",
|
||||
"ejs": "~1.0"
|
||||
"node-sass": "~3.2",
|
||||
"mincer": "~1.3",
|
||||
"ejs": "~2.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,15 +22,14 @@ class NodeMincerTest < Minitest::Test
|
|||
|
||||
def setup
|
||||
tmp_dir = File.join GEM_PATH, 'tmp/node-mincer'
|
||||
command = "node manifest.js #{tmp_dir}"
|
||||
success = Dir.chdir DUMMY_PATH do
|
||||
silence_stdout_if !ENV['VERBOSE'] do
|
||||
system(command)
|
||||
system 'node', 'manifest.js', tmp_dir
|
||||
end
|
||||
end
|
||||
assert success, 'Node.js Mincer compilation failed'
|
||||
manifest = JSON.parse(File.read("#{tmp_dir}/manifest.json"))
|
||||
css_name = manifest["assets"]["application.css"]
|
||||
css_name = manifest['assets']['application.css']
|
||||
@css = File.read("#{tmp_dir}/#{css_name}")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
# Test compilation with node-sass binary
|
||||
|
||||
mkdir -p tmp/node-sass
|
||||
node-sass assets/stylesheets/bootstrap -o tmp/node-sass/bootstrap.css && \
|
||||
node-sass assets/stylesheets/bootstrap/theme -o tmp/node-sass/bootstrap-theme.css || \
|
||||
node-sass assets/stylesheets/_bootstrap.scss -o tmp/node-sass/bootstrap.css && \
|
||||
node-sass assets/stylesheets/bootstrap/_theme.scss -o tmp/node-sass/bootstrap-theme.css || \
|
||||
(echo "node-sass compilation failed" && exit 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue