This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from vlaex/dev-1.0.1
v3.0.0
- Loading branch information
Showing
92 changed files
with
4,425 additions
and
738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
src/_locales/* | ||
src/assets/* | ||
src/locales/* | ||
src/assets/* | ||
src/typings/*.d.ts | ||
scripts/*.js | ||
scripts/gulp/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
node_modules/ | ||
package-lock.json | ||
.vscode/ | ||
.idea/ | ||
build/ | ||
dist/ | ||
dist/ | ||
debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/debug.log": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,10 @@ | ||
const { src, task, dest, series, watch } = require("gulp"); | ||
|
||
const gulpChange = require("gulp-change"); | ||
const mergeDeep = require("merge-deep"); | ||
const sass = require("gulp-dart-sass"); | ||
const zip = require("gulp-zip"); | ||
|
||
const { GetFiles, ExtractFolder } = require("./scripts/files"); | ||
|
||
const BUILD_FOLDER = "./build"; | ||
|
||
task("manifest", () => { | ||
const manifestData = { version: process.env.npm_package_version }; | ||
|
||
return src("./manifest.json") | ||
.pipe( | ||
gulpChange(content => { | ||
let json = JSON.parse(content); | ||
return JSON.stringify(mergeDeep(json, manifestData)); | ||
}) | ||
) | ||
.pipe(dest(BUILD_FOLDER)); | ||
}); | ||
|
||
task("assets", () => { | ||
const assets = [{ | ||
src: "./src/icons/**/*", | ||
buildDir: "icons" | ||
}, { | ||
src: "./src/_locales/**/*", | ||
buildDir: "_locales" | ||
}]; | ||
|
||
assets.forEach(asset => { | ||
src(asset.src).pipe(dest(`${BUILD_FOLDER}/${asset.buildDir}`)); | ||
}); | ||
|
||
return src("."); | ||
}); | ||
|
||
task("sass", () => { | ||
let files = GetFiles("./src/styles/*/styles.scss"); | ||
|
||
for (let file of files) { | ||
src(file) | ||
.pipe(sass({ outputStyle: "compressed" })) | ||
.pipe(dest(`${BUILD_FOLDER}/styles/${ExtractFolder(file)}`)); | ||
} | ||
|
||
return src("."); | ||
}); | ||
|
||
task("watch", () => { | ||
watch(["./src/styles/*/*.scss"], series("sass")); | ||
}); | ||
|
||
task("zip", () => { | ||
return src(`${BUILD_FOLDER}/**`) | ||
.pipe(zip("build.zip")) | ||
.pipe(dest("./dist")); | ||
}); | ||
|
||
exports.default = series("manifest", "assets", "sass", "watch", "zip"); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const tasks = require("./scripts/gulp"); | ||
|
||
exports.assets = tasks.assets; | ||
exports.manifest = tasks.manifest; | ||
exports.scss = tasks.scss; | ||
exports.watch = tasks.watch; | ||
exports.zip = tasks.zip; | ||
exports.clean = tasks.clean; | ||
exports.build = tasks.build; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { src, dest } = require("gulp"); | ||
|
||
module.exports = function moveAssets(done) { | ||
["icons", "_locales", "assets"].forEach(folder => { | ||
src(`src/${folder}/**/*`) | ||
.pipe(dest(`build/${folder}`)); | ||
}); | ||
|
||
done(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const del = require("del"); | ||
|
||
module.exports = async function clean(done) { | ||
await del(["build", "dist"]); | ||
|
||
done(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { parallel } = require("gulp"); | ||
|
||
exports.assets = require("./assets"); | ||
exports.manifest = require("./manifest"); | ||
exports.scss = require("./scss"); | ||
exports.watch = require("./watch"); | ||
exports.zip = require("./zip"); | ||
exports.clean = require("./clean"); | ||
|
||
exports.build = parallel( | ||
exports.manifest, | ||
exports.assets, | ||
exports.scss | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const { src, dest } = require("gulp"); | ||
const gulpChange = require("gulp-change"); | ||
const mergeDeep = require("merge-deep"); | ||
|
||
module.exports = function moveManifest() { | ||
const manifestData = { | ||
version: process.env.npm_package_version | ||
}; | ||
|
||
return src("manifest.json") | ||
.pipe( | ||
gulpChange(content => { | ||
let json = JSON.parse(content); | ||
return JSON.stringify(mergeDeep(json, manifestData)); | ||
}) | ||
) | ||
.pipe(dest("build")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { src, dest } = require("gulp"); | ||
const sass = require("gulp-dart-sass"); | ||
|
||
module.exports = function compileScss() { | ||
return src(["src/styles/*/styles.scss"]) | ||
.pipe(sass({ | ||
outputStyle: "compressed" | ||
})) | ||
.pipe(dest("build/styles")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { watch, series } = require("gulp"); | ||
|
||
module.exports = function watchFiles() { | ||
watch([ | ||
"src/styles/**/*.scss" | ||
], series("scss")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { src, dest, pipe } = require("gulp"); | ||
const zip = require("gulp-zip"); | ||
|
||
const { version } = require("../../package.json"); | ||
|
||
module.exports = function zipExtension() { | ||
return src("build/**") | ||
.pipe(zip( | ||
`build__${version.replace(/\./g, "_")}.zip` | ||
)) | ||
.pipe(dest("./dist")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": { | ||
"message": "Znanija Наставник", | ||
"description": "The name of the extension" | ||
}, | ||
"description": { | ||
"message": "Расширение для наставников znanija.com с полезными функциями и возможностями", | ||
"description": "The description" | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.