These mistakes happen too often for me to not put them in .gitignore
This commit is contained in:
parent
4f779ae64d
commit
b7087b249e
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@ node_modules/
|
|||||||
tmp-crx/
|
tmp-crx/
|
||||||
tmp-userjs/
|
tmp-userjs/
|
||||||
tmp-userscript/
|
tmp-userscript/
|
||||||
|
builds/4chan-X.zip
|
||||||
|
Gruntfile.js
|
||||||
210
Gruntfile.js
210
Gruntfile.js
@ -1,210 +0,0 @@
|
|||||||
module.exports = function(grunt) {
|
|
||||||
|
|
||||||
var pkg = grunt.file.readJSON('package.json');
|
|
||||||
var concatOptions = {
|
|
||||||
process: {
|
|
||||||
data: pkg
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var shellOptions = {
|
|
||||||
stdout: true,
|
|
||||||
stderr: true,
|
|
||||||
failOnError: true
|
|
||||||
};
|
|
||||||
|
|
||||||
// Project configuration.
|
|
||||||
grunt.initConfig({
|
|
||||||
pkg: pkg,
|
|
||||||
concat: {
|
|
||||||
coffee: {
|
|
||||||
options: concatOptions,
|
|
||||||
src: [
|
|
||||||
'src/General/Config.coffee',
|
|
||||||
'src/General/Globals.coffee',
|
|
||||||
'lib/**/*',
|
|
||||||
'src/General/UI.coffee',
|
|
||||||
'src/General/Header.coffee',
|
|
||||||
'src/General/Notification.coffee',
|
|
||||||
'src/General/Settings.coffee',
|
|
||||||
'src/General/Get.coffee',
|
|
||||||
'src/General/Build.coffee',
|
|
||||||
// Features -->
|
|
||||||
'src/Filtering/**/*',
|
|
||||||
'src/Quotelinks/**/*',
|
|
||||||
'src/Posting/**/*',
|
|
||||||
'src/Images/**/*',
|
|
||||||
'src/Menu/**/*',
|
|
||||||
'src/Monitoring/**/*',
|
|
||||||
'src/Archive/**/*',
|
|
||||||
'src/Miscellaneous/**/*',
|
|
||||||
// <--|
|
|
||||||
'src/General/Board.coffee',
|
|
||||||
'src/General/Thread.coffee',
|
|
||||||
'src/General/Post.coffee',
|
|
||||||
'src/General/Clone.coffee',
|
|
||||||
'src/General/DataBoard.coffee',
|
|
||||||
'src/General/Main.coffee'
|
|
||||||
],
|
|
||||||
dest: 'tmp-<%= pkg.type %>/script.coffee'
|
|
||||||
},
|
|
||||||
crx: {
|
|
||||||
options: concatOptions,
|
|
||||||
files: {
|
|
||||||
'builds/crx/manifest.json': 'src/Meta/manifest.json',
|
|
||||||
'builds/crx/script.js': [
|
|
||||||
'src/Meta/banner.js',
|
|
||||||
'tmp-<%= pkg.type %>/script.js'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
userjs: {
|
|
||||||
options: concatOptions,
|
|
||||||
src: [
|
|
||||||
'src/Meta/metadata.js',
|
|
||||||
'src/Meta/banner.js',
|
|
||||||
'tmp-<%= pkg.type %>/script.js'
|
|
||||||
],
|
|
||||||
dest: 'builds/<%= pkg.name %>.js'
|
|
||||||
},
|
|
||||||
userscript: {
|
|
||||||
options: concatOptions,
|
|
||||||
files: {
|
|
||||||
'builds/<%= pkg.name %>.meta.js': 'src/Meta/metadata.js',
|
|
||||||
'builds/<%= pkg.name %>.user.js': [
|
|
||||||
'src/Meta/metadata.js',
|
|
||||||
'src/Meta/banner.js',
|
|
||||||
'tmp-<%= pkg.type %>/script.js'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
copy: {
|
|
||||||
crx: {
|
|
||||||
src: 'img/*.png',
|
|
||||||
dest: 'builds/crx/',
|
|
||||||
expand: true,
|
|
||||||
flatten: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
coffee: {
|
|
||||||
script: {
|
|
||||||
src: 'tmp-<%= pkg.type %>/script.coffee',
|
|
||||||
dest: 'tmp-<%= pkg.type %>/script.js'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
concurrent: {
|
|
||||||
build: ['build-crx', 'build-userjs', 'build-userscript']
|
|
||||||
},
|
|
||||||
shell: {
|
|
||||||
commit: {
|
|
||||||
options: shellOptions,
|
|
||||||
command: [
|
|
||||||
'git checkout <%= pkg.meta.mainBranch %>',
|
|
||||||
'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."',
|
|
||||||
'git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."',
|
|
||||||
'git tag -af stable-v3 -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
|
|
||||||
].join(' && ')
|
|
||||||
},
|
|
||||||
push: {
|
|
||||||
options: shellOptions,
|
|
||||||
command: 'git push origin --tags -f && git push origin --all'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
all: {
|
|
||||||
options: {
|
|
||||||
interrupt: true
|
|
||||||
},
|
|
||||||
files: [
|
|
||||||
'Gruntfile.js',
|
|
||||||
'package.json',
|
|
||||||
'lib/**/*',
|
|
||||||
'src/**/*',
|
|
||||||
'html/**/*',
|
|
||||||
'css/**/*',
|
|
||||||
'img/**/*'
|
|
||||||
],
|
|
||||||
tasks: 'build'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
compress: {
|
|
||||||
crx: {
|
|
||||||
options: {
|
|
||||||
archive: 'builds/<%= pkg.name %>.zip',
|
|
||||||
level: 9,
|
|
||||||
pretty: true
|
|
||||||
},
|
|
||||||
expand: true,
|
|
||||||
flatten: true,
|
|
||||||
src: 'builds/crx/*',
|
|
||||||
dest: '/'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clean: {
|
|
||||||
builds: 'builds',
|
|
||||||
tmpcrx: 'tmp-crx',
|
|
||||||
tmpuserjs: 'tmp-userjs',
|
|
||||||
tmpuserscript: 'tmp-userscript'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-bump');
|
|
||||||
grunt.loadNpmTasks('grunt-concurrent');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-coffee');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-compress');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
||||||
grunt.loadNpmTasks('grunt-shell');
|
|
||||||
|
|
||||||
grunt.registerTask('default', ['build']);
|
|
||||||
|
|
||||||
grunt.registerTask('set-build', 'Set the build type variable', function(type) {
|
|
||||||
pkg.type = type;
|
|
||||||
grunt.log.ok('pkg.type = %s', type);
|
|
||||||
});
|
|
||||||
grunt.registerTask('build', ['concurrent:build']);
|
|
||||||
grunt.registerTask('build-crx', [
|
|
||||||
'set-build:crx',
|
|
||||||
'concat:coffee',
|
|
||||||
'coffee:script',
|
|
||||||
'concat:crx',
|
|
||||||
'copy:crx',
|
|
||||||
'clean:tmpcrx'
|
|
||||||
]);
|
|
||||||
grunt.registerTask('build-userjs', [
|
|
||||||
'set-build:userjs',
|
|
||||||
'concat:coffee',
|
|
||||||
'coffee:script',
|
|
||||||
'concat:userjs',
|
|
||||||
'clean:tmpuserjs'
|
|
||||||
]);
|
|
||||||
grunt.registerTask('build-userscript', [
|
|
||||||
'set-build:userscript',
|
|
||||||
'concat:coffee',
|
|
||||||
'coffee:script',
|
|
||||||
'concat:userscript',
|
|
||||||
'clean:tmpuserscript'
|
|
||||||
]);
|
|
||||||
|
|
||||||
grunt.registerTask('release', ['shell:commit', 'shell:push', 'build-crx', 'compress:crx']);
|
|
||||||
grunt.registerTask('patch', ['bump', 'reloadPkg', 'updcl:3', 'release']);
|
|
||||||
grunt.registerTask('minor', ['bump:minor', 'reloadPkg', 'updcl:2', 'release']);
|
|
||||||
grunt.registerTask('major', ['bump:major', 'reloadPkg', 'updcl:1', 'release']);
|
|
||||||
|
|
||||||
grunt.registerTask('reloadPkg', 'Reload the package', function() {
|
|
||||||
// Update the `pkg` object with the new version.
|
|
||||||
pkg = grunt.file.readJSON('package.json');
|
|
||||||
grunt.config.data.pkg = concatOptions.process.data = pkg;
|
|
||||||
grunt.log.ok('pkg reloaded.');
|
|
||||||
});
|
|
||||||
|
|
||||||
grunt.registerTask('updcl', 'Update the changelog', function(i) {
|
|
||||||
// i is the number of #s for markdown.
|
|
||||||
var version = new Array(+i + 1).join('#') + ' ' + pkg.version + ' - *' + grunt.template.today('yyyy-mm-dd') + '*';
|
|
||||||
grunt.file.write('CHANGELOG.md', version + '\n\n' + grunt.file.read('CHANGELOG.md'));
|
|
||||||
grunt.log.ok('Changelog updated for v' + pkg.version + '.');
|
|
||||||
});
|
|
||||||
|
|
||||||
};
|
|
||||||
Binary file not shown.
@ -1,14 +1,14 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<div class=sections-list></div>
|
<div class=sections-list></div>
|
||||||
<p class='imp-exp-result warning'></p>
|
<p class='imp-exp-result warning'></p>
|
||||||
<div class=credits>
|
<div class=credits>
|
||||||
<a class=export>Export</a> |
|
<a class=export>Export</a> |
|
||||||
<a class=import>Import</a> |
|
<a class=import>Import</a> |
|
||||||
<input type=file style='display: none;'>
|
<input type=file style='display: none;'>
|
||||||
<a href='<%= meta.page %>' target=_blank><%= meta.name %></a> |
|
<a href='<%= meta.page %>' target=_blank><%= meta.name %></a> |
|
||||||
<a href='<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md' target=_blank>#{g.VERSION}</a> |
|
<a href='<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md' target=_blank>#{g.VERSION}</a> |
|
||||||
<a href='<%= meta.repo %>blob/<%= meta.mainBranch %>/README.md#reporting-bugs-and-suggestions' target=_blank>Issues</a> |
|
<a href='<%= meta.repo %>blob/<%= meta.mainBranch %>/README.md#reporting-bugs-and-suggestions' target=_blank>Issues</a> |
|
||||||
<a href=javascript:; class=close title=Close>×</a>
|
<a href=javascript:; class=close title=Close>×</a>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class=section-container><section></section></div>
|
<div class=section-container><section></section></div>
|
||||||
Loading…
x
Reference in New Issue
Block a user