-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90ddf29
commit 1b3e2ac
Showing
11 changed files
with
5,398 additions
and
1,436 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = function (api) { | ||
api.cache(true); | ||
|
||
const presets = ['@babel/preset-env']; | ||
const plugins = []; | ||
|
||
return { | ||
presets, | ||
plugins | ||
}; | ||
} |
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,23 @@ | ||
{ | ||
"image_server_name": { | ||
"ps_url": "", | ||
"deploy_credentials": { | ||
"host": "", | ||
"user": "", | ||
"pass": "", | ||
"remotePath": "" | ||
} | ||
}, | ||
|
||
"image_server_name2": { | ||
"ps_url": "https://ps.example.com", | ||
"deploy_credentials": { | ||
"host": "sftp_host", | ||
"user": "user", | ||
"pass": "password", | ||
"remotePath": "/path/to/assets/folder" | ||
} | ||
}, | ||
|
||
"default_deploy_target": "image_server_name" | ||
} |
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,4 +1,6 @@ | ||
import gulp from 'gulp'; | ||
import psTasks from 'gulp-ps-tasks'; | ||
import * as psTasks from 'gulp4-ps-tasks' | ||
|
||
psTasks(gulp, __dirname); | ||
// Parse the exports gulp tasks from index.js | ||
Object.keys(psTasks).forEach(key => { | ||
module.exports[key] = psTasks[key] | ||
}) |
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
2 changes: 1 addition & 1 deletion
2
plugin/web_root/admin/studentlist/studentlist2.autoloader.content.footer.txt
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 +1 @@ | ||
<link href="/scripts/list-students-autoloader/css/print-list.css" rel="stylesheet" media="print"> | ||
<link href="/scripts/list-students-autoloader/css/autoloader.css" rel="stylesheet" media="print"> |
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,74 @@ | ||
import path from 'path' | ||
import webpack from 'webpack' | ||
import pkgInfo from 'pkginfo' | ||
|
||
pkgInfo(module) | ||
|
||
const config = { | ||
entry: { | ||
'autoloader': `./src/scripts/${module.exports.name}/js/autoloader.js`, | ||
}, | ||
performance: { | ||
hints: false | ||
}, | ||
externals: { | ||
jquery: 'jquery', | ||
underscore: 'underscore' | ||
}, | ||
optimization: { | ||
splitChunks: { | ||
name: true, | ||
cacheGroups: { | ||
index: { | ||
test: /static\/js/ | ||
}, | ||
vendors: { | ||
test: /([\\/]node_modules[\\/])/, | ||
name: 'vendor', | ||
chunks: 'all' | ||
} | ||
} | ||
} | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(html)$/, | ||
use: { | ||
loader: 'html-loader', | ||
options: { minimize: true } | ||
} | ||
}, | ||
{ | ||
test: /\.(js|jsx)$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader', | ||
options: { | ||
presets: ['@babel/preset-env'], | ||
plugins: [ | ||
"@babel/plugin-transform-modules-amd", | ||
"@babel/plugin-transform-regenerator", | ||
"@babel/plugin-transform-runtime", | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new webpack.NamedModulesPlugin(), | ||
new webpack.ProvidePlugin({ | ||
$: 'jquery', | ||
jQuery: 'jquery', | ||
'window.jQuery': 'jquery', | ||
createDayLabel: "jquery", | ||
createWeekdayLabel: "jquery" | ||
}), | ||
], | ||
resolve: { | ||
modules: ['src', 'node_modules'], | ||
extensions: ['.js', '.css'], | ||
} | ||
|
||
} | ||
|
||
export default config |
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,73 @@ | ||
import path from 'path' | ||
import webpack from 'webpack' | ||
import merge from 'webpack-merge' | ||
import HtmlWebpackPlugin from 'html-webpack-plugin'; | ||
import MiniCssExtractPlugin from 'mini-css-extract-plugin' | ||
import DashboardPlugin from 'webpack-dashboard/plugin' | ||
import BrowserSyncPlugin from 'browser-sync-webpack-plugin' | ||
|
||
import common from './webpack.common.babel' | ||
|
||
export default merge(common, { | ||
devtool: 'inline-source-map', | ||
mode: 'development', | ||
output: { | ||
path: path.resolve(__dirname, './src/public/dist/'), | ||
filename: `[name].bundle.js`, | ||
publicPath: '/' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(sc|c)ss$/, | ||
use: [ | ||
{ | ||
loader: MiniCssExtractPlugin.loader, | ||
options: { | ||
includePaths: [ | ||
path.resolve(__dirname, 'node_modules/') | ||
] | ||
} | ||
}, | ||
'css-loader', | ||
'sass-loader' | ||
] | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin({ multiStep: true }), | ||
new MiniCssExtractPlugin({ | ||
filename: '[name].bundle.css' | ||
}), | ||
new HtmlWebpackPlugin({ | ||
template: './src/html/template.html', | ||
inject: 'body' | ||
}), | ||
new BrowserSyncPlugin({ | ||
host: '0.0.0.0', | ||
port: 3001, | ||
proxy: 'http://localhost:3000/', | ||
reload: false, | ||
open: false | ||
}) | ||
], | ||
devServer: { | ||
headers: { | ||
'Access-Control-Allow-Origin': '*' | ||
}, | ||
contentBase: './src/public', | ||
compress: true, | ||
host: '0.0.0.0', | ||
port: '3000', | ||
bonjour: true, | ||
hot: true, | ||
historyApiFallback: true, | ||
inline: true, | ||
clientLogLevel: 'error', | ||
watchOptions: { | ||
aggregateTimeout: 500, | ||
poll: 1000 | ||
} | ||
} | ||
}) |
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,45 @@ | ||
import path from 'path' | ||
import webpack from 'webpack' | ||
import merge from 'webpack-merge' | ||
import MiniCssExtractPlugin from 'mini-css-extract-plugin' | ||
import pkgInfo from 'pkginfo' | ||
|
||
import common from './webpack.common.babel' | ||
|
||
pkgInfo(module) | ||
|
||
export default merge(common, { | ||
mode: 'production', | ||
// devtool: 'source-map', | ||
output: { | ||
path: path.resolve(__dirname, 'dist/web_root'), | ||
filename: `scripts/${module.exports.name}/js/[name].js`, | ||
publicPath: 'https://ps.irondistrict.org', | ||
library: 'autoloader', | ||
libraryTarget: 'amd' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(sc|c)ss$/, | ||
use: [ | ||
{ | ||
loader: MiniCssExtractPlugin.loader, | ||
options: { | ||
includePaths: [ | ||
path.resolve(__dirname, 'node_modules/') | ||
] | ||
} | ||
}, | ||
'css-loader', | ||
'sass-loader' | ||
] | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin({ | ||
filename: `scripts/${module.exports.name}/css/[name].css` | ||
}) | ||
] | ||
}) |
Oops, something went wrong.