Просмотр исходного кода

Switch to Grunt from Rake

master
Lokesh Dhakar 6 лет назад
Родитель
Сommit
4edeff6cb4
8 измененных файлов: 109 добавлений и 88 удалений
  1. +5
    -13
      .gitignore
  2. +0
    -20
      .jshintrc
  3. +0
    -4
      .npmignore
  4. +0
    -3
      Gemfile
  5. +0
    -16
      Gemfile.lock
  6. +90
    -0
      Gruntfile.js
  7. +0
    -19
      config.rb
  8. +14
    -13
      package.json

+ 5
- 13
.gitignore Просмотреть файл

@@ -1,24 +1,16 @@
# SVN #
######################
*.svn

# Logs and databases #
######################
*.log
*.sql
*.sqlite
.htaccess
.ftppass
.host_config

# OS generated files #
######################
*.DS_Store
ehthumbs.db
Icon?
Thumbs.db

# Software files #
######################
.espresso*
.sass-cache/*
.sass-cache
Rakefile
rsync-exclude
/node_modules
node_modules

+ 0
- 20
.jshintrc Просмотреть файл

@@ -1,20 +0,0 @@
{
"bitwise": true,
"boss": true,
"browser": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"indent": 2,
"latedef": false,
"maxerr": 100,
"multistr": true,
"noarg": true,
"noempty": true,
"plusplus": false,
"quotmark": "true",
"regexp": true,
"strict": false,
"trailing": true,
"unused": true
}

+ 0
- 4
.npmignore Просмотреть файл

@@ -1,4 +0,0 @@
.jshintrc
coffee
releases
sass

+ 0
- 3
Gemfile Просмотреть файл

@@ -1,3 +0,0 @@
source 'https://rubygems.org'

gem 'compass'

+ 0
- 16
Gemfile.lock Просмотреть файл

@@ -1,16 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
chunky_png (1.2.8)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
fssm (0.2.10)
sass (3.2.9)

PLATFORMS
x86-mingw32

DEPENDENCIES
compass

+ 90
- 0
Gruntfile.js Просмотреть файл

@@ -0,0 +1,90 @@
module.exports = function(grunt) {

grunt.initConfig({
host_config: grunt.file.readJSON('.host_config'),
compass: {
dist: {
options: {
sassDir: 'sass',
cssDir: 'css',
environment: 'production'
}
}
},
connect: {
server: {
options: {
port: 8000
}
}
},
exec: {
list: {
cmd: ['ls', 'ls -l'].join('&&')
},
},
'ftp-deploy': {
build: {
auth: {
host: '<%- host_config.host %>',
port: '<%- host_config.port %>'
},
src: '.',
dest: '<%- host_config.directory %>',
exclusions: [
'.DS_Store',
'.sass-cache',
'.git*',
'.host_config',
'.ftppass',
'node_modules',
'sass',
'Gruntfile.js',
'package.json'
]
}
},
jshint: {
files: ['js/lightbox.js']
},
uglify: {
options: {
preserveComments: 'some',
sourceMap: true
},
dist: {
files: {
'js/lightbox.min.js': ['js/lightbox.js']
}
}
},
watch: {
sass: {
files: ['sass/*.sass'],
tasks: ['compass'],
options: {
livereload: true,
spawn: false
},
},
test: {
files: ['js/lightbox.js'],
tasks: ['jshint']
}
}
});

grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-ftp-deploy');


grunt.registerTask('default', ['compass', 'connect', 'watch']);
grunt.registerTask('test', ['compass', 'jshint']);
grunt.registerTask('zip', ['uglify','exec:list']);
// grunt.registerTask('deploy', ['compass', 'jshint', 'ftp-deploy']);
};

+ 0
- 19
config.rb Просмотреть файл

@@ -1,19 +0,0 @@
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed

# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false

preferred_syntax = :sass

+ 14
- 13
package.json Просмотреть файл

@@ -1,11 +1,14 @@
{
"name": "lightbox2",
"version": "2.6.0",
"version": "2.7.0",
"author": "Lokesh Dhakar",
"description": "Lightbox is small javascript library used to overlay images on top of the current page.",
"description": "Lightbox is small javascript library used to overlay images on top of the current page. It's a snap to setup and works on all modern browsers.",
"keywords": [
"lightbox",
"lightbox2",
"overlay",
"image"
"image",
"gallery"
],
"homepage": "http://lokeshdhakar.com/projects/lightbox2/",
"repository": {
@@ -15,14 +18,6 @@
"bugs": {
"url": "https://github.com/lokesh/lightbox2/issues"
},
"scripts": {
"build": "coffee --compile --output ./js/ ./coffee/",
"check": "jshint ./js/lightbox.js",
"lint": "jshint ./js/lightbox.js",
"install-compass": "bundle install",
"update-compass": "bundle update",
"build-compass": "bundle exec compass compile"
},
"licenses": [
{
"type": "Creative Commons Attribution 2.5 License",
@@ -30,7 +25,13 @@
}
],
"devDependencies": {
"coffee-script": "~1.6.3",
"jshint": "~2.1.4"
"grunt": "~0.4.2",
"grunt-contrib-compass": "^0.7.2",
"grunt-contrib-watch": "^0.5.3",
"grunt-contrib-connect": "^0.7.1",
"grunt-ftp-deploy": "^0.1.1",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-jshint": "~0.9.2",
"grunt-exec": "~0.4.5"
}
}

Загрузка…
Отмена
Сохранить