Skip to content

Commit

Permalink
updated for minimum build
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillip Demro committed Jan 10, 2018
1 parent 2a84ee8 commit 2c07bdf
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 40 deletions.
54 changes: 54 additions & 0 deletions config/config.full.json
@@ -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"
}
}
36 changes: 0 additions & 36 deletions config/config.json
Expand Up @@ -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"
}
}
8 changes: 4 additions & 4 deletions gulpfile.custom.js
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions gulpfile.js
Expand Up @@ -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.