mirror of https://github.com/hans362/DisqusJS.git
Compare commits
44 Commits
Author | SHA1 | Date |
---|---|---|
|
9f18b70670 | 4 years ago |
|
acc15cb127 | 4 years ago |
|
703935ce70 | 4 years ago |
|
8b806951d6 | 4 years ago |
|
c2a3959bbe | 4 years ago |
|
14fbd12c3e | 4 years ago |
|
b2db72ad8b | 4 years ago |
|
7cce96652a | 5 years ago |
|
136a3a7efb | 5 years ago |
|
60a5430737 | 5 years ago |
|
d13b4d60ad | 5 years ago |
|
6ab240b777 | 5 years ago |
|
af6512312b | 5 years ago |
|
112f5d0f31 | 5 years ago |
|
fd7bdec054 | 5 years ago |
|
7ba5054a6f | 5 years ago |
|
4a79b818d2 | 5 years ago |
|
0b7db01af2 | 5 years ago |
|
45457378f5 | 5 years ago |
|
471521d2a8 | 5 years ago |
|
2942e4b72f | 5 years ago |
|
208693364a | 6 years ago |
|
4cf41cca54 | 6 years ago |
|
777d98ca39 | 6 years ago |
|
81d486ac8b | 6 years ago |
|
0bf5b7ed6f | 6 years ago |
|
e134a73215 | 6 years ago |
|
50fd9e1f77 | 6 years ago |
|
2b9183490e | 6 years ago |
|
694e707fee | 6 years ago |
|
b51f38aa93 | 6 years ago |
|
35ef15e95b | 6 years ago |
|
c65587525f | 6 years ago |
|
5fc2bac75c | 6 years ago |
|
eb6867563c | 6 years ago |
|
0284aa8953 | 6 years ago |
|
a95c0db360 | 6 years ago |
|
06ca1fe07b | 6 years ago |
|
b8a204b2e2 | 6 years ago |
|
cd48f97ab9 | 6 years ago |
|
3a0ff649de | 6 years ago |
|
7cbcf47100 | 6 years ago |
|
bdb856418c | 6 years ago |
|
1e81dc3664 | 6 years ago |
@ -0,0 +1,37 @@
|
|||||||
|
name: DisqusJS Build Automatically
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [9.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
yarn global add gulp-cli
|
||||||
|
yarn
|
||||||
|
gulp build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
deploy_key: ${{ secrets.DEPLOY_KEY }}
|
||||||
|
publish_branch: release
|
||||||
|
publish_dir: ./dist
|
@ -1,3 +1,5 @@
|
|||||||
src/index.html
|
src/index.html
|
||||||
|
|
||||||
|
dist/index.html
|
||||||
|
|
||||||
docs/
|
docs/
|
||||||
|
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 @@
|
|||||||
|
disqusjs.skk.moe
|
@ -1,66 +1,64 @@
|
|||||||
let gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
let uglify = require('gulp-uglify');
|
const uglify = require('gulp-uglify');
|
||||||
let babel = require('gulp-babel');
|
const babel = require('gulp-babel');
|
||||||
let autoprefixer = require('gulp-autoprefixer');
|
const autoprefixer = require('gulp-autoprefixer');
|
||||||
let cleanCSS = require('gulp-clean-css');
|
const cleanCSS = require('gulp-clean-css');
|
||||||
let header = require('gulp-header');
|
const header = require('gulp-header');
|
||||||
let pkg = require('./package.json');
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
var jsBanner = ['/*!',
|
|
||||||
' * DisqusJS | v<%= pkg.version %>',
|
|
||||||
' * Author: SukkaW',
|
|
||||||
' * Link: https://github.com/SukkaW/DisqusJS',
|
|
||||||
' * License: <%= pkg.license %>',
|
|
||||||
' */'
|
|
||||||
].join('\n');
|
|
||||||
|
|
||||||
var cssBanner = ['/*!',
|
const jsBanner = ['/*! DisqusJS v<%= pkg.version %>',
|
||||||
' * DisqusJS - Default Theme | v<%= pkg.version %>',
|
'Sukka (https://skk.moe)',
|
||||||
' * Author: SukkaW',
|
'https://disqusjs.skk.moe',
|
||||||
' * Link: https://github.com/SukkaW/DisqusJS',
|
'<%= pkg.license %> License */',
|
||||||
' * License: <%= pkg.license %>',
|
].join(' | ');
|
||||||
' */'
|
|
||||||
].join('\n');
|
|
||||||
|
|
||||||
|
const cssBanner = ['/*! DisqusJS - Default Theme | v<%= pkg.version %>',
|
||||||
|
'Sukka (https://skk.moe)',
|
||||||
|
'https://disqusjs.skk.moe',
|
||||||
|
'<%= pkg.license %> License */'
|
||||||
|
].join(' | ');
|
||||||
|
|
||||||
var configs = {
|
|
||||||
browsers: [
|
const browserslist = [
|
||||||
'last 2 versions',
|
'last 3 versions',
|
||||||
'since 2015',
|
'since 2016',
|
||||||
'> 1%',
|
'> 1%',
|
||||||
'Chrome >= 30',
|
'Chrome >= 49',
|
||||||
'Firefox >= 30',
|
'Firefox >= 50',
|
||||||
'ie >= 9',
|
'ie >= 11',
|
||||||
'Safari >= 9',
|
'Safari >= 9',
|
||||||
],
|
]
|
||||||
|
|
||||||
|
const configs = {
|
||||||
|
autoprefixer: {
|
||||||
|
overrideBrowserslist: browserslist
|
||||||
|
},
|
||||||
cleanCSS: {
|
cleanCSS: {
|
||||||
compatibility: 'ie9'
|
compatibility: 'ie11'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('minify-js', () => {
|
gulp.task('minify-js', () => gulp.src('src/**/*.js')
|
||||||
return gulp.src('src/**/*.js')
|
.pipe(babel({
|
||||||
.pipe(babel({
|
'presets': [
|
||||||
"presets": [
|
['@babel/env', {
|
||||||
["@babel/env", {
|
'targets': browserslist,
|
||||||
"targets": configs.browsers
|
'loose': true
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
}))
|
}))
|
||||||
.pipe(uglify({
|
.pipe(uglify({
|
||||||
keep_fnames: false
|
keep_fnames: false
|
||||||
}))
|
}))
|
||||||
.pipe(header(jsBanner, { pkg: pkg }))
|
.pipe(header(jsBanner, { pkg }))
|
||||||
.pipe(gulp.dest('dist'));
|
.pipe(gulp.dest('dist')));
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('minify-css', () => {
|
gulp.task('minify-css', () => gulp.src('src/**/*.css')
|
||||||
return gulp.src('src/**/*.css')
|
.pipe(autoprefixer(configs.autoprefixer))
|
||||||
.pipe(autoprefixer(configs.browsers))
|
.pipe(cleanCSS(configs.cleanCSS))
|
||||||
.pipe(cleanCSS(configs.cleanCSS))
|
.pipe(header(cssBanner, { pkg }))
|
||||||
.pipe(header(cssBanner, { pkg: pkg }))
|
.pipe(gulp.dest('dist')));
|
||||||
.pipe(gulp.dest('dist'));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('build', gulp.parallel('minify-js', 'minify-css'));
|
gulp.task('build', gulp.parallel('minify-js', 'minify-css'));
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue