Skip to content

Commit

Permalink
Merge branch 'materialManager' into 'master'
Browse files Browse the repository at this point in the history
Material manager

See merge request obsidian/starter!10
  • Loading branch information
Eole211 committed May 21, 2019
2 parents 8e1d302 + 577a636 commit 222e979
Show file tree
Hide file tree
Showing 24 changed files with 1,795 additions and 1,430 deletions.
26 changes: 18 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"rules": {
"quotes": ["error", "double"],
"indent": ["error", 4],
"no-underscore-dangle": "off",
"no-plusplus": "off",
"padded-blocks": [
"error",
{
Expand All @@ -34,15 +36,23 @@
"functions": "ignore"
}
],
"no-param-reassign": ["error", { "props": false }],
"global-require": "off"
"no-param-reassign": ["error", {
"props": false
}],
"global-require": "off",
"object-shorthand": "off"
},
"overrides": [
{
"files": ["*.test.js"],
"env": {
"jest": true
"overrides": [{
"files": ["*.test.js"],
"env": {
"jest": true
}
}],
"settings": {
"import/resolver": {
"webpack": {
"config": "config/webpack.common.js"
}
}
]
}
}
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Notice :

This is a fork of https://github.com/wanadev/obsidianjs-starter adding Wanadev
specific (private) configuration for deployment & caas.
This is a fork of https://git.wanadev.org/obsidian/starter with a babylonjs 3D scene and vueJs.
It uses the **[obsidian-babylon-engine](https://git.wanadev.org/obsidian/obsidian-engine-babylonjs)** and **[obsidian-material-manager](https://git.wanadev.org/ldemicheli/obsidian-material-manager)** modules.

Please do not submit merge requests or open issues here if not linked to Wanadev
infrastructure.

Upstream repository url: `git@github.com:wanadev/obsidianjs-starter.git`
Upstream repository url: `git@git.wanadev.org:obsidian/starter.git`

---

Expand Down
94 changes: 57 additions & 37 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");

// Vue Config
const VueLoaderPlugin = require("vue-loader/lib/plugin");


const ROOT_DIR = path.resolve(__dirname, "../");

module.exports = {
Expand All @@ -12,55 +16,71 @@ module.exports = {
},
target: "web",
module: {
rules: [
{
test: /\.(js|jsx)$/,
use: [
{
loader: "babel-loader",
options: {
cacheDirectory: true,
},
},
],
exclude: path.join(ROOT_DIR, "node_modules"),
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"],
},
{
test: /\.less$/,
use: [MiniCssExtractPlugin.loader, "css-loader", "less-loader", "postcss-loader"],
},
{
test: /\.glsl$/,
use: [
{
loader: "webpack-glsl-loader",
},
],
},
rules: [{
test: /\.(js|jsx)$/,
use: [{
loader: "babel-loader",
options: {
cacheDirectory: true,
presets: ["@babel/preset-env"],
},
}],
exclude: path.join(ROOT_DIR, "node_modules"),
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"],
},
{
test: /\.less$/,
use: [MiniCssExtractPlugin.loader, "css-loader", "less-loader", "postcss-loader"],
},
{
test: /\.glsl$/,
use: [{
loader: "webpack-glsl-loader",
}],
},
{
test: /\.vue$/,
use: [{
loader: "vue-loader",
}],
exclude: path.join(ROOT_DIR, "node_modules"),
},
],
},
plugins: [
new MiniCssExtractPlugin({
filename: "style/[name].[chunkhash].bundle.css",
}),
new CopyWebpackPlugin([
{ from: "**/*", to: "assets", context: "src/assets" },
{
from: "*/assets/**/*",
to: "assets/modules/[1]/[2]",
test: /.*src[\\/]modules[\\/]([^\\/]*)[\\/]assets[\\/](.+)$/,
context: "src/modules",
},
new CopyWebpackPlugin([{
from: "**/*",
to: "assets",
context: "src/assets",
},
{
from: "*/assets/**/*",
to: "assets/modules/[1]/[2]",
test: /.*src[\\/]modules[\\/]([^\\/]*)[\\/]assets[\\/](.+)$/,
context: "src/modules",
},
]),
new HtmlWebpackPlugin({
template: "src/index.html",
inject: true,
sourceMap: true,
chunksSortMode: "dependency",
}),

// VueJs !
new VueLoaderPlugin(),
],

resolve: {
alias: {
vue: "vue/dist/vue.js",
src: path.resolve("src"),
},
},
};
2 changes: 1 addition & 1 deletion config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const PORT = process.env.PORT || 8080;

module.exports = merge(common, {
mode: "development",
devtool: "cheap-eval-source-map",
devtool: "eval-source-map",
output: {
path: DIST_DIR,
filename: "bundle.js",
Expand Down

0 comments on commit 222e979

Please sign in to comment.