Initial setup

This commit is contained in:
Nikita Karamov 2020-09-23 16:08:21 +02:00
parent e85aa15400
commit b617ff258b
No known key found for this signature in database
GPG key ID: E40DFE6E993540FF
5 changed files with 4954 additions and 1 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
dist
node_modules

View file

@ -1 +1,3 @@
# template # toot
`toot` is a share page for Mastodon, allowing you to share stuff cross-instance

32
gulpfile.js Normal file
View file

@ -0,0 +1,32 @@
const gulp = require('gulp');
const postcss = require('gulp-postcss');
const pug = require('gulp-pug');
const sass = require('gulp-sass');
sass.compiler = require('sass');
function html() {
return gulp.src('./src/**/*.pug')
.pipe(pug())
.pipe(gulp.dest('./dist/'));
}
function css() {
return gulp.src('./src/style/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(postcss([require('autoprefixer')]))
.pipe(gulp.dest('./dist/'));
}
function js() {
return gulp.src('./src/script/**/*.js')
.pipe(gulp.dest('./dist/'));
}
exports.default = gulp.parallel(html, css, js);
exports.watch = () => {
gulp.watch('./src/**/*.pug', html);
gulp.watch('./src/style/**/*.scss', css);
gulp.watch('./src/script/**/*.js', js);
}

30
package.json Normal file
View file

@ -0,0 +1,30 @@
{
"name": "toot",
"version": "0.0.0",
"main": "src/index.pug",
"repository": "git@github.com:NickKaramoff/toot.git",
"author": "Nikita Karamov <nick@karamoff.dev>",
"license": "MIT",
"private": "true",
"scripts": {
"build": "gulp",
"dev": "gulp watch"
},
"devDependencies": {
"autoprefixer": "^9.8.6",
"browserslist": "^4.14.4",
"cross-env": "^7.0.2",
"cssnano": "^4.1.10",
"gulp": "^4.0.2",
"gulp-postcss": "^8.0.0",
"gulp-pug": "^4.0.1",
"gulp-sass": "^4.1.0",
"npm-run-all": "^4.1.5",
"postcss": "^7.0.34",
"pug": "^3.0.0",
"sass": "^1.26.11"
},
"browserslist": [
"defaults"
]
}

4887
yarn.lock Normal file

File diff suppressed because it is too large Load diff