mirror of
https://github.com/wassname/talk.git
synced 2026-07-26 13:37:38 +08:00
Linting and Patch
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React, { Component } from "react";
|
||||
import { getSlotElements } from "coral-framework/helpers/plugins";
|
||||
import React, {Component} from 'react';
|
||||
import {getSlotElements} from 'coral-framework/helpers/plugins';
|
||||
|
||||
class Slot extends Component {
|
||||
render() {
|
||||
const { fill, ...rest } = this.props;
|
||||
const {fill, ...rest} = this.props;
|
||||
return (
|
||||
<div>
|
||||
{getSlotElements(fill, rest)}
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
* module.exports = [{plugin: string, module: object}, ...]
|
||||
*
|
||||
*/
|
||||
const { stripIndent } = require("common-tags");
|
||||
const {stripIndent} = require('common-tags');
|
||||
|
||||
function getPluginList(config) {
|
||||
return config.client.map(x => typeof x === "string" ? x : Object.keys(x)[0]);
|
||||
return config.client.map(x => typeof x === 'string' ? x : Object.keys(x)[0]);
|
||||
}
|
||||
|
||||
module.exports = function(source) {
|
||||
@@ -18,15 +18,11 @@ module.exports = function(source) {
|
||||
const config = this.exec(source, this.resourcePath);
|
||||
const plugins = getPluginList(config);
|
||||
|
||||
plugins.map(plugin => {
|
||||
list.push(
|
||||
`{module: require('plugins/${plugin}/client/index.js'), plugin: '${plugin}'}`
|
||||
);
|
||||
});
|
||||
plugins.map(plugin => `{module: require('plugins/${plugin}/client/index.js'), plugin: '${plugin}'}`);
|
||||
|
||||
return stripIndent`
|
||||
module.exports = [
|
||||
${plugins.join(",")}
|
||||
${plugins.join(',')}
|
||||
];
|
||||
`;
|
||||
};
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
"postinstall": "./bin/cli plugins reconcile --skip-remote",
|
||||
"start": "./bin/cli serve --jobs",
|
||||
"dev-start": "nodemon --config .nodemon.json --exec \"./bin/cli -c .env serve --jobs\"",
|
||||
"build": "NODE_ENV=production webpack --progress -p --config webpack.config.js --bail",
|
||||
"build": "NODE_ENV=production webpack -p --config webpack.config.js --bail",
|
||||
"build-watch": "NODE_ENV=development webpack --progress --config webpack.config.js --watch",
|
||||
"lint": "eslint bin/* .",
|
||||
"lint-fix": "eslint bin/* . --fix",
|
||||
|
||||
Reference in New Issue
Block a user