Permalink
Browse files

updated for minimum build

  • Loading branch information...
pdemro committed Jan 10, 2018
1 parent 2a84ee8 commit 2c07bdfc4f7150418741687990e57965e248f277
Showing with 66 additions and 40 deletions.
  1. +54 −0 config/config.full.json
  2. +0 −36 config/config.json
  3. +4 −4 gulpfile.custom.js
  4. +8 −0 gulpfile.js
@@ -0,0 +1,54 @@
{
"$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0",
"bundles": {
"hello-world-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/helloWorld/HelloWorldWebPart.js",
"manifest": "./src/webparts/helloWorld/HelloWorldWebPart.manifest.json"
}
]
},
"hello-world-2-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/helloWorld2/HelloWorld2WebPart.js",
"manifest": "./src/webparts/helloWorld2/HelloWorld2WebPart.manifest.json"
}
]
},
"hello-world-extension-application-customizer": {
"components": [
{
"entrypoint": "./lib/extensions/helloWorldExtension/HelloWorldExtensionApplicationCustomizer.js",
"manifest": "./src/extensions/helloWorldExtension/HelloWorldExtensionApplicationCustomizer.manifest.json"
}
]
},
"hello-world-3-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/helloWorld3/HelloWorld3WebPart.js",
"manifest": "./src/webparts/helloWorld3/HelloWorld3WebPart.manifest.json"
}
]
},
"hello-world-2-extension-application-customizer": {
"components": [
{
"entrypoint": "./lib/extensions/helloWorld2Extension/HelloWorld2ExtensionApplicationCustomizer.js",
"manifest": "./src/extensions/helloWorld2Extension/HelloWorld2ExtensionApplicationCustomizer.manifest.json"
}
]
}
},
"externals": {},
"localizedResources": {
"HelloWorldWebPartStrings": "lib/webparts/helloWorld/loc/{locale}.js",
"HelloWorld2WebPartStrings": "lib/webparts/helloWorld2/loc/{locale}.js",
"HelloWorldExtensionApplicationCustomizerStrings": "lib/extensions/helloWorldExtension/loc/{locale}.js",
"HelloWorld3WebPartStrings": "lib/webparts/helloWorld3/loc/{locale}.js",
"HelloWorld2ExtensionApplicationCustomizerStrings": "lib/extensions/helloWorld2Extension/loc/{locale}.js"
}
}
@@ -2,53 +2,17 @@
"$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0",
"bundles": {
"hello-world-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/helloWorld/HelloWorldWebPart.js",
"manifest": "./src/webparts/helloWorld/HelloWorldWebPart.manifest.json"
}
]
},
"hello-world-2-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/helloWorld2/HelloWorld2WebPart.js",
"manifest": "./src/webparts/helloWorld2/HelloWorld2WebPart.manifest.json"
}
]
},
"hello-world-extension-application-customizer": {
"components": [
{
"entrypoint": "./lib/extensions/helloWorldExtension/HelloWorldExtensionApplicationCustomizer.js",
"manifest": "./src/extensions/helloWorldExtension/HelloWorldExtensionApplicationCustomizer.manifest.json"
}
]
},
"hello-world-3-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/helloWorld3/HelloWorld3WebPart.js",
"manifest": "./src/webparts/helloWorld3/HelloWorld3WebPart.manifest.json"
}
]
},
"hello-world-2-extension-application-customizer": {
"components": [
{
"entrypoint": "./lib/extensions/helloWorld2Extension/HelloWorld2ExtensionApplicationCustomizer.js",
"manifest": "./src/extensions/helloWorld2Extension/HelloWorld2ExtensionApplicationCustomizer.manifest.json"
}
]
}
},
"externals": {},
"localizedResources": {
"HelloWorldWebPartStrings": "lib/webparts/helloWorld/loc/{locale}.js",
"HelloWorld2WebPartStrings": "lib/webparts/helloWorld2/loc/{locale}.js",
"HelloWorldExtensionApplicationCustomizerStrings": "lib/extensions/helloWorldExtension/loc/{locale}.js",
"HelloWorld3WebPartStrings": "lib/webparts/helloWorld3/loc/{locale}.js",
"HelloWorld2ExtensionApplicationCustomizerStrings": "lib/extensions/helloWorld2Extension/loc/{locale}.js"
}
}
@@ -3,16 +3,16 @@ const build = require('@microsoft/sp-build-web');
build.tslint.enabled = false;
build.tslint.mergeConfig({
sourceMatch: [
"src/webparts/<your webpart here>/**/*.ts",
"src/webparts/<your webpart here>/**/*.tsx",
"src/**/helloWorld2/**/*.ts",
"src/**/helloWorld2/**/*.tsx",
]
});

build.typescript.mergeConfig({
sourceMatch: [
//Your webpart files & supporting files
"src/**/<your webpart here>/**/*.ts",
"src/**/<your webpart here>/**/*.tsx",
"src/**/helloWorld2/**/*.ts",
"src/**/helloWorld2/**/*.tsx",
//Default settings
"typings/main/**/*.ts",
"typings/main.d.ts",
@@ -4,4 +4,12 @@ const gulp = require('gulp');
const build = require('@microsoft/sp-build-web');
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);

try {
require('./gulpfile.custom');
} catch (e) {
if (e.code !== 'MODULE_NOT_FOUND') {
throw e;
}
}

build.initialize(gulp);

0 comments on commit 2c07bdf

Please sign in to comment.