Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spfx-fast-serve

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spfx-fast-serve - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

docs/ESLint.md

10

CHANGELOG.md
# Change Log
## [3.0.2] - 10 June 2021
## [3.0.3] - 09 Dec 2021
### Features
- automatic "beta" detection
## [3.0.2] - 10 Jun 2021
### Features
- schema changed to support latest SPFx
- minor improvements
## [3.0.1] - 08 June 2021
## [3.0.1] - 08 Jun 2021

@@ -12,0 +18,0 @@ ### Features

2

docs/FAQ.md

@@ -36,3 +36,3 @@ # FAQs / known issues <!-- omit in toc -->

HMR is not supported. I tried different things, but was not able to make it work. If you have ideas, please welcome to issues or PRs :)
HMR is supported, however considered as experimental. Please checkout config settings [option `hotRefresh`](../README.md#configuration-options).

@@ -39,0 +39,0 @@ ## 5. How to debug with Chrome Debugger extension from VSCode?

@@ -36,3 +36,3 @@ "use strict";

const filePath = path.join(process.cwd(), consts_1.FastServeFolderName, consts_1.WebpackExtendFileName);
const webpackContent = fs.readFileSync(utils_1.getTemplatesPath(consts_1.WebpackExtendFileName)).toString();
const webpackContent = fs.readFileSync((0, utils_1.getTemplatesPath)(consts_1.WebpackExtendFileName)).toString();
if (!fs.existsSync(filePath)) {

@@ -39,0 +39,0 @@ fs.writeFileSync(filePath, webpackContent);

@@ -53,3 +53,3 @@ "use strict";

}
const replaceContent = fs.readFileSync(utils_1.getTemplatesPath('gulpfile.js')).toString();
const replaceContent = fs.readFileSync((0, utils_1.getTemplatesPath)('gulpfile.js')).toString();
const options = {

@@ -56,0 +56,0 @@ files: gulpfilePath,

@@ -37,5 +37,5 @@ "use strict";

const packageString = fs.readFileSync(packagePath).toString();
const indent = detect_indent_1.default(packageString).indent || ' ';
const indent = (0, detect_indent_1.default)(packageString).indent || ' ';
const packageJson = JSON.parse(packageString);
const minorVersion = utils_1.getSpfxMinorVersion();
const minorVersion = (0, utils_1.getSpfxMinorVersion)();
const templateDeps = {};

@@ -54,2 +54,5 @@ if (minorVersion >= 4 && minorVersion < 9) {

}
if ((0, utils_1.isBeta)()) {
templateDeps['spfx-fast-serve-helpers'] = `${templateDeps['spfx-fast-serve-helpers']}-beta.0`;
}
if (isLibraryComponent && minorVersion < 12) {

@@ -56,0 +59,0 @@ templateDeps['concurrently'] = '5.3.0';

@@ -33,3 +33,3 @@ "use strict";

static createSettings() {
const argv = yargs_1.default(process.argv.slice(2)).options({
const argv = (0, yargs_1.default)(process.argv.slice(2)).options({
port: { type: 'number' }

@@ -44,3 +44,3 @@ }).argv;

let schemaUrl = consts_1.SchemaUrl;
const spfxVersion = utils_1.getSpfxMinorVersion();
const spfxVersion = (0, utils_1.getSpfxMinorVersion)();
if (spfxVersion === 4) {

@@ -47,0 +47,0 @@ schemaUrl = consts_1.SchemaUrlOld;

@@ -22,5 +22,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getSpfxMinorVersion = exports.getTemplatesPath = void 0;
exports.isBeta = exports.getSpfxMinorVersion = exports.getTemplatesPath = void 0;
const path = __importStar(require("path"));
const packagePath = path.join(process.cwd(), 'package.json');
const dependecyToCheck = '@microsoft/sp-build-web';
const packageJson = require(packagePath);

@@ -33,3 +34,2 @@ function getTemplatesPath(fileName) {

function getSpfxMinorVersion() {
const dependecyToCheck = '@microsoft/sp-build-web';
let version = packageJson.devDependencies[dependecyToCheck];

@@ -42,2 +42,7 @@ if (version.indexOf('~') === 0 || version.indexOf('^') === 0) {

exports.getSpfxMinorVersion = getSpfxMinorVersion;
function isBeta() {
const version = packageJson.devDependencies[dependecyToCheck];
return version.indexOf('-beta') !== -1;
}
exports.isBeta = isBeta;
//# sourceMappingURL=utils.js.map
{
"name": "spfx-fast-serve",
"version": "3.0.2",
"version": "3.0.3",
"author": "Sergei Sergeev (https://github.com/s-KaiNet)",

@@ -5,0 +5,0 @@ "description": "Improve your SharePoint Framework development by speeding up 'serve' command",

@@ -37,4 +37,2 @@ # :rocket: SPFx Fast Serve Tool

It's assumed, that you're already using `spfx-fast-serve@3.x`. If not, read [section](#migration-to-3x-version-of-spfx-fast-serve) above and migrate to `3.x` first.
As soon as you use `3.x` version, then the migration is as easy as just changing the version of `spfx-fast-serve-helpers` in your `package.json` to match the corresponding SPFx **minor** version (**do not** change patch version).

@@ -66,7 +64,7 @@

- `open` - boolean, default `true`, whether to open a workbench url on startup
- `openUrl` - string, default `undefined`, which url to open. If empty, local workbench will be opened
- `loggingLevel` - string, default `normal`, valid values are `"minimal", "normal", "detailed"`. `minimal` notifies about errors and new builds only, `normal` adds bundle information, `detailed` adds details about each bundle.
- `fullScreenErrors` - boolean, default `true`, whether to show full-screen (overlay) errors. Corresponds to [webpack's dev server overlay](https://webpack.js.org/configuration/dev-server/#devserveroverlay)
- `hotRefresh` - boolean, default `false`. When `true` enables webpack's [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/) (HMR). This features is considered as experimental meaning that you can try and use if it works well for your project. Read [more here](/docs/HMR.md) how to properly configure SPFx to work with HMR.
- `hotRefresh` - *[SPFx 1.12+]* boolean, default `false`. When `true` enables webpack's [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/) (HMR). This features is considered as experimental meaning that you can try and use if it works well for your project. Read [more here](/docs/HMR.md) how to properly configure SPFx to work with HMR.
- `eslint` - *[SPFx 1.13+]* boolean, default `false`. When `true`, adds [eslint-webpack-plugin](https://github.com/webpack-contrib/eslint-webpack-plugin) to lint your code. Read [more here](/docs/ESLint.md) how to properly configure it.

@@ -82,3 +80,2 @@ Here is a sample configuration:

"serve": {
"open": true,
"openUrl": "https://<org>.sharepoint.com/sites/dev/_layouts/15/workbench.aspx",

@@ -114,2 +111,8 @@ "fullScreenErrors": true

## NGROK serve plugin
`spfx-fast-serve` supports ngrok as a proxy between webpack dev server and SharePoint. This is possible through the *NgrokServePlugin* webpack plugin. This option allows you to test your SPFx solution live on mobile devices in development mode.
Read more [here](/docs/NgrokServe.md) on how you can configure it.
## Library components

@@ -116,0 +119,0 @@

@@ -13,2 +13,5 @@ {

"type": "boolean"
},
"port": {
"type": "integer"
}

@@ -26,7 +29,7 @@ },

"type": "boolean",
"description": "Whether to open a browser after the starting serve. You can configure opening url by using 'openUrl' property"
"description": "[Obsolete in SPFx 1.13+] Whether to open a browser after the starting serve. You can configure opening url by using 'openUrl' property"
},
"openUrl": {
"type": "string",
"description": "The url, which will opened after the serve. If empty, local workbench will opened"
"description": "The url, which will be opened after the serve."
},

@@ -47,3 +50,7 @@ "fullScreenErrors": {

"type": "boolean",
"description": "[SPFx 1.12+] Enables Hot Module Replacement (HMR). This feature currently is experimental. Read more at the spfx-fast-serve GitHub homepage"
"description": "[SPFx 1.12+] Enables Hot Module Replacement (HMR). This feature currently is experimental. Read more https://github.com/s-KaiNet/spfx-fast-serve#configuration-options"
},
"eslint": {
"type": "boolean",
"description": "[SPFx 1.13+] Enables eslint for the project. Read more https://github.com/s-KaiNet/spfx-fast-serve#configuration-options"
}

@@ -50,0 +57,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc