Add /etc
This commit is contained in:
parent
3675b3b441
commit
65dbae91c3
11 changed files with 31 additions and 11 deletions
5
Rules
5
Rules
|
@ -24,12 +24,13 @@ tdata = Ryo.from_json(path: File.join(dirs.content, "json", "t.json"))
|
|||
surahs = Ryo.from_json(path: File.join(dirs.content, "json", "surahs.json"))
|
||||
tidy = `which tidy || which tidy5`.chomp
|
||||
buildenv = ENV["buildenv"] || "development"
|
||||
etcdir = File.join(__dir__, "etc")
|
||||
|
||||
##
|
||||
# Plugins
|
||||
# Filters
|
||||
Nanoc::Webpack
|
||||
.default_argv
|
||||
.replace([*Nanoc::Webpack.default_argv, "--config", "webpack.#{buildenv}.js"].uniq)
|
||||
.replace([*Nanoc::Webpack.default_argv, "--config", File.join(etcdir, "webpack.#{buildenv}.js")].uniq)
|
||||
Nanoc::Tidy
|
||||
.default_argv
|
||||
.replace([*Nanoc::Tidy.default_argv, "-upper"].uniq)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"include": ["../src/**/*.ts", "../src/**/*.tsx"],
|
||||
"exclude": ["../node_modules"],
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"module": "commonjs",
|
||||
|
@ -9,7 +11,7 @@
|
|||
"jsx": "react",
|
||||
"lib": [ "ES2020", "DOM" ],
|
||||
|
||||
"baseUrl": "src/",
|
||||
"baseUrl": "../src/",
|
||||
"paths": {
|
||||
"~/*": ["./js/*"],
|
||||
"@json/*": ["./json/*"]
|
|
@ -2,11 +2,11 @@ const path = require("path");
|
|||
|
||||
module.exports = {
|
||||
resolve: {
|
||||
modules: [path.resolve(__dirname, "node_modules")],
|
||||
modules: [path.resolve(__dirname, "..", "node_modules")],
|
||||
alias: {
|
||||
"@css": path.resolve(__dirname, "src/css"),
|
||||
"@json": path.resolve(__dirname, "src/json"),
|
||||
"~": path.resolve(__dirname, "src/js"),
|
||||
"@css": path.resolve(__dirname, "..", "src", "css"),
|
||||
"@json": path.resolve(__dirname, "..", "src", "json"),
|
||||
"~": path.resolve(__dirname, "..", "src", "js"),
|
||||
},
|
||||
extensions: [".js", ".ts", ".tsx", ".json", ".css", ".scss"],
|
||||
},
|
|
@ -4,8 +4,9 @@
|
|||
"./packages/typescript/*"
|
||||
],
|
||||
"scripts": {
|
||||
"tsc": "tsc --noEmit",
|
||||
"eslint": "npm exec eslint -- --fix src/js/"
|
||||
"tsc": "npx tsc --noEmit -p etc/tsconfig.json",
|
||||
"eslint": "npx eslint --config etc/eslint.config.mjs src/js/",
|
||||
"eslint:apply": "npx eslint --config etc/eslint.config.mjs --fix src/js/"
|
||||
},
|
||||
"dependencies": {
|
||||
"classnames": "^2.3",
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace :ci do
|
|||
end
|
||||
|
||||
task :eslint do
|
||||
sh "npx eslint src/js"
|
||||
sh "npm run eslint"
|
||||
end
|
||||
|
||||
task :tsc do
|
||||
|
|
|
@ -3,13 +3,23 @@
|
|||
namespace :format do
|
||||
desc "Run rubocop (Ruby)"
|
||||
task :rubocop do
|
||||
sh "bundle exec rubocop -A"
|
||||
sh "bundle exec rubocop --config etc/rubocop.yml"
|
||||
end
|
||||
|
||||
desc "Apply rubocop (Ruby)"
|
||||
task :"rubocop:apply" do
|
||||
sh "bundle exec rubocop -A --config etc/rubocop.yml"
|
||||
end
|
||||
|
||||
desc "Run eslint (TypeScript)"
|
||||
task :eslint do
|
||||
sh "npm run eslint"
|
||||
end
|
||||
|
||||
desc "Run eslint (TypeScript)"
|
||||
task :"eslint:apply" do
|
||||
sh "npm run eslint:apply"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run all formats"
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
* vNEXT
|
||||
|
||||
**** Add ~etc/~
|
||||
This change moves a large portion of the website's configuration
|
||||
files to the ~/etc~ directory
|
||||
|
||||
* v0.9.0
|
||||
|
||||
**** Add ~share/al-quran.reflectslight.io/documentation/~
|
||||
|
|
Loading…
Reference in a new issue