Skip to content

Commit

Permalink
rename main packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Feb 11, 2020
1 parent 6ac1310 commit 3577a7c
Show file tree
Hide file tree
Showing 165 changed files with 209 additions and 268 deletions.
16 changes: 0 additions & 16 deletions packages/electrode-archetype-react-app-dev/README.md

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions packages/xarc-app-dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Archetype: Electrode React App (Development Part)

[![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![devDependency Status][daviddm-dev-image]][daviddm-dev-url] [![npm downloads][npm-downloads-image]][npm-downloads-url]

A Walmart Labs flavored react app archetype.

---

[npm-image]: https://badge.fury.io/js/@xarc/app-dev.svg
[npm-url]: https://npmjs.org/package/@xarc/app-dev
[daviddm-image]: https://david-dm.org/electrode-io/electrode/status.svg?path=packages/@xarc/app-dev
[daviddm-url]: https://david-dm.org/electrode-io/electrode?path=packages/@xarc/app-dev
[daviddm-dev-image]: https://david-dm.org/electrode-io/electrode/dev-status.svg?path=packages/@xarc/app-dev
[daviddm-dev-url]: https://david-dm.org/electrode-io/electrode?path=packages/@xarc/app-dev?type-dev
[npm-downloads-image]: https://img.shields.io/npm/dm/@xarc/app-dev.svg
[npm-downloads-url]: https://www.npmjs.com/package/@xarc/app-dev
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const ck = require("chalker");
const requireAt = require("require-at");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const optionalRequire = require("optional-require")(require);
const optFlow = optionalRequire("electrode-archetype-opt-flow");

Expand Down Expand Up @@ -72,7 +72,7 @@ const basePlugins = [

const { BABEL_ENV, NODE_ENV } = process.env;

const fileId = "electrode-archetype-react-app-dev:babelrc-client.js";
const fileId = "xarc-app-dev:babelrc-client.js";

const checkEnv = names => {
names = names.filter(x => !process.env.hasOwnProperty(x));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const optionalRequire = require("optional-require")(require);
const optFlow = optionalRequire("electrode-archetype-opt-flow");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ extends:
globals:
expect: false
sandbox: false
# this will by removed by
# https://gecgithub01.walmart.com/electrode/electrode-archetype-react-component/issues/10
sinon: false
env:
mocha: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ extends:
globals:
expect: false
sandbox: false
# this will by removed by
# https://gecgithub01.walmart.com/electrode/electrode-archetype-react-component/issues/10
sinon: false
env:
mocha: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ extends:
globals:
document: false
expect: false
# this will by removed by
# https://gecgithub01.walmart.com/electrode/electrode-archetype-react-component/issues/10
sinon: false
Element: false
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const optRequire = getOptArchetypeRequire("electrode-archetype-opt-jest");
const jestPkg = optRequire("jest/package.json");
const jestMajVersion = parseInt(jestPkg.version.split(".")[0], 10);

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");

const { enableTypeScript } = archetype.babel;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const logger = require("electrode-archetype-react-app/lib/logger");
const archetype = require("@xarc/app/config/archetype");
const logger = require("@xarc/app/lib/logger");

module.exports = function(settings) {
const browser = archetype.karma.browser.toLowerCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ try {
/*
* We need a global sinon to maintain compatibility
* with existing test suites. However, this will be
* removed in the future and is being tracked by
* https://gecgithub01.walmart.com/electrode/electrode-archetype-react-component/issues/10
* removed in the future.
*/
try {
var sinon = require("sinon");
Expand Down
5 changes: 5 additions & 0 deletions packages/xarc-app-dev/config/mocha/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--require @xarc/app-dev/config/mocha/setup.js
--reporter spec
--recursive
--ui bdd
--require @babel/register
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const AppMode = archetype.AppMode;
const Path = require("path");
const identity = require("lodash/identity");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const Url = require("url");
// const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const webpackDevReporter = require("../util/webpack-dev-reporter");

const HTTP_PORT = 80;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const AppMode = archetype.AppMode;
const Path = require("path");
const clientDllConfig = require(Path.resolve(AppMode.src.client, "dll.config.js"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
const fs = require("fs");
const filterScanDir = require("filter-scan-dir");
const webpack = require("webpack");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const Path = require("path");
const logger = require("electrode-archetype-react-app/lib/logger");
const logger = require("@xarc/app/lib/logger");

module.exports = function(options) {
const config = options.currentConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ const Fs = require("fs");
const _ = require("lodash");
const optionalRequire = require("optional-require")(require);
const Path = require("path");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const AppMode = archetype.AppMode;
const chalk = require("chalk");
const logger = require("electrode-archetype-react-app/lib/logger");
const logger = require("@xarc/app/lib/logger");
const mkdirp = require("mkdirp");

const DEV_HMR_DIR = ".__dev_hmr";
Expand Down Expand Up @@ -86,7 +86,7 @@ if (subApp.reduxReducers && (!subApp.reduxCreateStore || subApp._genReduxCreateS
Fs.writeFileSync(
Path.join(hmrDir, hmrEntry),
`
// generated by electrode-archetype-react-app-dev/config/webpack/partial/entry.js
// generated by @xarc/app-dev/config/webpack/partial/entry.js
// for redux reducers hot module reloading during development
import subApp from "${subAppReq}";
${reducerHmrCode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* eslint-disable max-statements, complexity */

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const Path = require("path");
const detectCssModule = require("../util/detect-css-module");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const urlLoader = require.resolve("url-loader");
const fileLoader = require.resolve("file-loader");
const isomorphicLoader = require.resolve("isomorphic-loader");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");

module.exports = function() {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const isomorphicLoader = require.resolve("isomorphic-loader");
const optionalRequire = require("optional-require")(require);
const _ = require("lodash");
const logger = require("electrode-archetype-react-app/lib/logger");
const logger = require("@xarc/app/lib/logger");

function getCdnLoader(optLoader) {
if (optLoader) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const IsomorphicLoaderPlugin = require("isomorphic-loader/lib/webpack-plugin");
const Path = require("path");
const { babel } = archetype;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const LoadablePlugin = require("@loadable/webpack-plugin");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
module.exports = function() {
return {
plugins: archetype.babel.enableDynamicImport
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const logger = require("electrode-archetype-react-app/lib/logger");
const archetype = require("@xarc/app/config/archetype");
const logger = require("@xarc/app/lib/logger");

module.exports = function(options) {
const config = options.currentConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const Path = require("path");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const { AppMode, babel } = archetype;

const inspectpack = process.env.INSPECTPACK_DEBUG === "true";
Expand Down Expand Up @@ -31,7 +31,9 @@ module.exports = {
path: getOutputPath(),
pathinfo: inspectpack, // Enable path information for inspectpack
publicPath: "/js/",
chunkFilename: babel.hasMultiTargets ? `${babel.target}.[contenthash].[name].js` : "[contenthash].[name].js",
chunkFilename: babel.hasMultiTargets
? `${babel.target}.[contenthash].[name].js`
: "[contenthash].[name].js",
filename: getOutputFilename()
}
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");

module.exports = function() {
return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const Path = require("path");
const requireAt = require("require-at");
const AppMode = archetype.AppMode;
Expand All @@ -11,7 +11,7 @@ const optionalRequire = require("optional-require")(require);

const swConfigPath = Path.resolve("config", "sw-config.js");
const mkdirp = require("mkdirp");
const logger = require("electrode-archetype-react-app/lib/logger");
const logger = require("@xarc/app/lib/logger");

/**
* Takes a file path and returns a webpack-compatible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const identity = require("lodash/identity");
const Path = require("path");
const ModuleResolver = require("electrode-node-resolver/lib/webpack-plugin");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");

module.exports = {
resolveLoader: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const AppMode = archetype.AppMode;
const Path = require("path");
const ModuleResolver = require("electrode-node-resolver/lib/webpack-plugin");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Path = require("path");
const mkdirp = require("mkdirp");
const _ = require("lodash");
const INDENT = 2;
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");

module.exports = function(opts) {
const StatsWriterPlugin = require("webpack-stats-plugin").StatsWriterPlugin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const Crypto = require("crypto");
const { AppMode, webpack } = require("electrode-archetype-react-app/config/archetype");
const { AppMode, webpack } = require("@xarc/app/config/archetype");

const config = {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function getWebpackStartConfig(defaultFile) {

function setWebpackProfile(profile) {
if (useAppWebpackConfig()) {
const logger = require("electrode-archetype-react-app/lib/logger");
const logger = require("@xarc/app/lib/logger");
// verify that profile exist in options directory
require.resolve(`../options/${profile}`);
process.env.ELECTRODE_WEBPACK_PROFILE = profile || "production";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const Path = require("path");
const filterScanDir = require("filter-scan-dir");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");
const AppMode = archetype.AppMode;
const { getOptArchetypeRequire } = require("../../../lib/utils");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
const Fs = require("fs");
const Path = require("path");
const _ = require("lodash");
const logger = require("electrode-archetype-react-app/lib/logger");
const archetype = require("electrode-archetype-react-app/config/archetype");
const logger = require("@xarc/app/lib/logger");
const archetype = require("@xarc/app/config/archetype");
const mkdirp = require("mkdirp");
const { devServerBaseUrl } = require("../util/webpack-dev-url");
const requireAt = require("require-at");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const WebpackConfigComposer = require("webpack-config-composer");
const optionalRequire = require("optional-require")(require);
const Path = require("path");
const _ = require("lodash");
const logger = require("electrode-archetype-react-app/lib/logger");
const logger = require("@xarc/app/lib/logger");

function searchUserCustomConfig(options) {
let customConfig;
Expand Down Expand Up @@ -85,10 +85,7 @@ function generateConfig(opts, archetypeControl) {
const keepCustomProps = options.keepCustomProps;

const compose = () => {
const r = composer.compose(
{ keepCustomProps, meta: true },
options.profileNames
);
const r = composer.compose({ keepCustomProps, meta: true }, options.profileNames);
logger.info("Composed webpack config from profiles:", r.profileNames.join(", "));
logger.info("Webpack config partials:", r.partialNames.join(", "));
return r.config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const Fs = require("fs");
const Path = require("path");
const archetype = require("electrode-archetype-react-app/config/archetype");
const archetype = require("@xarc/app/config/archetype");

module.exports = function notifyBundleValid() {
setTimeout(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function webpackDevReporter(reporterOptions) {
const state = reporterOptions.state;
const stats = reporterOptions.stats;
const options = reporterOptions.options;
const logger = require("electrode-archetype-react-app/lib/logger");
const logger = require("@xarc/app/lib/logger");

if (state) {
let displayStats = !options.quiet && options.stats !== false;
Expand Down
File renamed without changes.
Loading

0 comments on commit 3577a7c

Please sign in to comment.