Bower → npm, update build workflow.
parent
665dd191f5
commit
378bc28ea3
|
@ -7,18 +7,18 @@ module.exports = function(grunt) {
|
||||||
require('load-grunt-tasks')(grunt);
|
require('load-grunt-tasks')(grunt);
|
||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
cmpnt: grunt.file.readJSON('../bower.json'),
|
pkg: require('./package.json'),
|
||||||
banner: '/*! Social Likes v<%= cmpnt.version %> by Artem Sapegin - ' +
|
banner: '/*! Social Likes v<%= pkg.version %> by Artem Sapegin - ' +
|
||||||
'http://sapegin.github.com/social-likes - Licensed MIT */\n',
|
'http://sapegin.github.com/social-likes - Licensed MIT */\n',
|
||||||
jshint: {
|
jshint: {
|
||||||
options: {
|
options: {
|
||||||
jshintrc: '.jshintrc'
|
jshintrc: 'src/.jshintrc'
|
||||||
},
|
},
|
||||||
files: ['social-likes.js']
|
files: ['src/social-likes.js']
|
||||||
},
|
},
|
||||||
jscs: {
|
jscs: {
|
||||||
options: {
|
options: {
|
||||||
config: ".jscs.json"
|
config: "src/.jscs.json"
|
||||||
},
|
},
|
||||||
files: ['<%= jshint.files %>']
|
files: ['<%= jshint.files %>']
|
||||||
},
|
},
|
||||||
|
@ -27,8 +27,8 @@ module.exports = function(grunt) {
|
||||||
banner: '<%= banner %>'
|
banner: '<%= banner %>'
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
src: 'social-likes.js',
|
src: 'src/social-likes.js',
|
||||||
dest: '../social-likes.min.js'
|
dest: 'dist/social-likes.min.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stylus: {
|
stylus: {
|
||||||
|
@ -40,9 +40,9 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
compile: {
|
compile: {
|
||||||
files: {
|
files: {
|
||||||
'../social-likes_flat.css': 'styles/flat/index.styl',
|
'dist/social-likes_flat.css': 'src/styles/flat/index.styl',
|
||||||
'../social-likes_classic.css': 'styles/classic/index.styl',
|
'dist/social-likes_classic.css': 'src/styles/classic/index.styl',
|
||||||
'../social-likes_birman.css': 'styles/birman/index.styl'
|
'dist/social-likes_birman.css': 'src/styles/birman/index.styl'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
contrib: {
|
contrib: {
|
||||||
|
@ -50,8 +50,8 @@ module.exports = function(grunt) {
|
||||||
compress: false
|
compress: false
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
'../contrib/css/github.css': '../contrib/styles/github.styl',
|
'contrib/css/github.css': 'contrib/styles/github.styl',
|
||||||
'../contrib/css/livejournal.css': '../contrib/styles/livejournal.styl'
|
'contrib/css/livejournal.css': 'contrib/styles/livejournal.styl'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -62,19 +62,19 @@ module.exports = function(grunt) {
|
||||||
dist: {
|
dist: {
|
||||||
expand: true,
|
expand: true,
|
||||||
flatten: true,
|
flatten: true,
|
||||||
src: '../*.css',
|
src: 'dist/*.css',
|
||||||
dest: '../'
|
dest: 'dist'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
webfont: {
|
webfont: {
|
||||||
flat: {
|
flat: {
|
||||||
src: 'styles/flat/icons/*.svg',
|
src: 'src/styles/flat/icons/*.svg',
|
||||||
dest: 'styles/flat/font',
|
dest: 'src/styles/flat/font',
|
||||||
options: {
|
options: {
|
||||||
font: 'social-likes',
|
font: 'social-likes',
|
||||||
types: 'woff',
|
types: 'woff',
|
||||||
embed: 'woff',
|
embed: 'woff',
|
||||||
template: 'styles/flat/webfont.styl',
|
template: 'src/styles/flat/webfont.styl',
|
||||||
stylesheet: 'styl',
|
stylesheet: 'styl',
|
||||||
hashes: false,
|
hashes: false,
|
||||||
htmlDemo: false,
|
htmlDemo: false,
|
||||||
|
@ -90,9 +90,9 @@ module.exports = function(grunt) {
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: 'styles/classic/icons_src/',
|
cwd: 'src/styles/classic/icons_src/',
|
||||||
src: '*.png',
|
src: '*.png',
|
||||||
dest: 'styles/classic/icons/'
|
dest: 'src/styles/classic/icons/'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -100,9 +100,9 @@ module.exports = function(grunt) {
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: 'styles/birman/icons_src/',
|
cwd: 'src/styles/birman/icons_src/',
|
||||||
src: '*.png',
|
src: '*.png',
|
||||||
dest: 'styles/birman/icons/'
|
dest: 'src/styles/birman/icons/'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ module.exports = function(grunt) {
|
||||||
options: {
|
options: {
|
||||||
atBegin: true
|
atBegin: true
|
||||||
},
|
},
|
||||||
files: 'styles/**',
|
files: 'src/styles/**',
|
||||||
tasks: ['stylus:compile']
|
tasks: ['stylus:compile']
|
||||||
}
|
}
|
||||||
}
|
}
|
24
bower.json
24
bower.json
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
"name": "social-likes",
|
|
||||||
"version": "3.0.15",
|
|
||||||
"license": "MIT",
|
|
||||||
"main": [
|
|
||||||
"./src/social-likes.js",
|
|
||||||
"./social-likes_classic.css",
|
|
||||||
"./social-likes_flat.css",
|
|
||||||
"./social-likes_birman.css"
|
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"contrib/icons",
|
|
||||||
"contrib/styles",
|
|
||||||
"src/styles",
|
|
||||||
"src/Gruntfile.js",
|
|
||||||
"src/package.json",
|
|
||||||
"src/update-gh-pages.sh",
|
|
||||||
"src/.jscs.json",
|
|
||||||
"src/.jshintrc"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"jquery": ">=1.8"
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
"name": "social-likes",
|
||||||
|
"version": "3.0.15",
|
||||||
|
"description": "Beautiful social “like” buttons with counters for jQuery",
|
||||||
|
"homepage": "https://github.com/sapegin/social-likes",
|
||||||
|
"author": {
|
||||||
|
"name": "Artem Sapegin",
|
||||||
|
"url": "http://sapegin.me/"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/sapegin/social-likes.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sapegin/social-likes/issues"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "src/social-likes.js",
|
||||||
|
"files": [
|
||||||
|
"src",
|
||||||
|
"dist",
|
||||||
|
"contrib"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.12.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"jquery": ">=1.8"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"autoprefixer-stylus": "0.3.0",
|
||||||
|
"grunt": "~0.4.5",
|
||||||
|
"grunt-cli": "~0.1.13",
|
||||||
|
"grunt-contrib-imagemin": "~0.8.1",
|
||||||
|
"grunt-contrib-jshint": "~0.10.0",
|
||||||
|
"grunt-contrib-stylus": "~0.20.0",
|
||||||
|
"grunt-contrib-uglify": "~0.6.0",
|
||||||
|
"grunt-contrib-watch": "~0.6.1",
|
||||||
|
"grunt-csso": "~0.6.3",
|
||||||
|
"grunt-jscs-checker": "~0.7.1",
|
||||||
|
"grunt-webfont": "~0.4.8",
|
||||||
|
"load-grunt-tasks": "~0.6.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "grunt",
|
||||||
|
"test": "grunt",
|
||||||
|
"replace-version": "grunt replace:version",
|
||||||
|
"build-gh-pages": "scripts/update-gh-pages.sh"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Updating Social Likes on gh-pages…"
|
||||||
|
|
||||||
|
cp ../dist/social-likes_flat.css ../../social-likes_gh-pages/src/
|
||||||
|
cp ../dist/social-likes_classic.css ../../social-likes_gh-pages/src/
|
||||||
|
cp ../dist/social-likes_birman.css ../../social-likes_gh-pages/src/
|
||||||
|
cp ../dist/social-likes.min.js ../../social-likes_gh-pages/src/
|
||||||
|
cp ../package.json ../../social-likes_gh-pages/src/
|
||||||
|
cp ../src/social-likes.js ../../social-likes_gh-pages/src/
|
||||||
|
pushd ../../social-likes_gh-pages/
|
||||||
|
npm run replace-version
|
||||||
|
git commit -m "Update Social Likes." src index.html ru/index.html
|
||||||
|
git push
|
||||||
|
popd
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
"name": "social-likes",
|
|
||||||
"title": "Social Likes",
|
|
||||||
"description": "Beautiful “like” buttons with counters for popular social networks.",
|
|
||||||
"keywords": [
|
|
||||||
"like",
|
|
||||||
"button",
|
|
||||||
"social",
|
|
||||||
"network",
|
|
||||||
"facebook",
|
|
||||||
"twitter",
|
|
||||||
"google",
|
|
||||||
"livejournal"
|
|
||||||
],
|
|
||||||
"version": "3.0.14",
|
|
||||||
"author": {
|
|
||||||
"name": "Artem Sapegin",
|
|
||||||
"email": "artem@sapegin.ru",
|
|
||||||
"url": "http://sapegin.me"
|
|
||||||
},
|
|
||||||
"licenses": [
|
|
||||||
{
|
|
||||||
"type": "MIT",
|
|
||||||
"url": "https://github.com/sapegin/social-likes/blob/master/license.md"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"bugs": "https://github.com/sapegin/social-likes/issues",
|
|
||||||
"homepage": "http://sapegin.github.com/social-likes/",
|
|
||||||
"docs": "https://github.com/sapegin/social-likes/blob/master/Readme.md",
|
|
||||||
"download": "http://sapegin.github.com/social-likes/",
|
|
||||||
"demo": "http://sapegin.github.com/social-likes/",
|
|
||||||
"dependencies": {
|
|
||||||
"jquery": ">=1.7"
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"name": "social-likes",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"devDependencies": {
|
|
||||||
"grunt": "~0.4.5",
|
|
||||||
"grunt-contrib-jshint": "~0.10.0",
|
|
||||||
"grunt-contrib-uglify": "~0.6.0",
|
|
||||||
"grunt-contrib-watch": "~0.6.1",
|
|
||||||
"grunt-contrib-stylus": "~0.20.0",
|
|
||||||
"grunt-csso": "~0.6.3",
|
|
||||||
"grunt-webfont": "~0.4.8",
|
|
||||||
"autoprefixer-stylus": "0.3.0",
|
|
||||||
"grunt-jscs-checker": "~0.7.1",
|
|
||||||
"load-grunt-tasks": "~0.6.0",
|
|
||||||
"grunt-contrib-imagemin": "~0.8.1"
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Updating Social Likes on gh-pages…"
|
|
||||||
|
|
||||||
grunt build
|
|
||||||
cp ../social-likes_flat.css ../../social-likes_gh-pages/src/
|
|
||||||
cp ../social-likes_classic.css ../../social-likes_gh-pages/src/
|
|
||||||
cp ../social-likes_birman.css ../../social-likes_gh-pages/src/
|
|
||||||
cp ../social-likes.min.js ../../social-likes_gh-pages/src/
|
|
||||||
cp ../bower.json ../../social-likes_gh-pages/src/
|
|
||||||
cp social-likes.js ../../social-likes_gh-pages/src/
|
|
||||||
pushd ../../social-likes_gh-pages/
|
|
||||||
grunt replace:version
|
|
||||||
git commit -m "Update Social Likes." src index.html ru/index.html
|
|
||||||
git push
|
|
||||||
popd
|
|
Loading…
Reference in New Issue