lincd-cli 0.2.18 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,10 +6,10 @@ import {BrowserRouter} from 'react-router-dom';
6
6
  import App from './App';
7
7
  import React from 'react';
8
8
  import {Storage} from 'lincd/lib/utils/Storage';
9
- import {FrontendFileStore} from 'lincd-server/lib/shapes/FrontendFileStore';
9
+ import {BackendFileStore} from 'lincd-server/lib/shapes/BackendFileStore';
10
10
 
11
11
  //store all quads in a file on the backend named 'main'
12
- export const store = new FrontendFileStore('main');
12
+ export const store = new BackendFileStore('main');
13
13
  Storage.setDefaultStore(store);
14
14
 
15
15
  hydrateRoot(
@@ -69,6 +69,7 @@ var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlug
69
69
  var TerserPlugin = require('terser-webpack-plugin');
70
70
  var exec = require('child_process').exec;
71
71
  var CopyPlugin = require('copy-webpack-plugin');
72
+ var tailwindPlugin = require('tailwindcss/plugin');
72
73
  var NODE_ENV = process.env.NODE_ENV;
73
74
  var nodeProduction = NODE_ENV == 'production';
74
75
  // const libraryName = 'lincd';
@@ -245,6 +246,7 @@ function generateWebpackConfig(buildName, moduleName, config) {
245
246
  postcssPlugins.push([
246
247
  'tailwindcss',
247
248
  {
249
+ content: __spreadArray(['./src/**/*.{tsx,ts}'], __read(lincdPackagePaths), false),
248
250
  safelist: productionMode
249
251
  ? {}
250
252
  : {
@@ -252,7 +254,22 @@ function generateWebpackConfig(buildName, moduleName, config) {
252
254
  pattern: /./,
253
255
  variants: ['sm', 'md', 'lg', 'xl', '2xl']
254
256
  },
255
- content: __spreadArray(['./src/**/*.{tsx,ts}'], __read(lincdPackagePaths), false)
257
+ theme: {
258
+ extend: {
259
+ colors: (0, utils_1.getLinkedTailwindColors)()
260
+ }
261
+ },
262
+ plugins: [
263
+ tailwindPlugin(function (_a) {
264
+ var addBase = _a.addBase, config = _a.config;
265
+ //we can use LINCD CSS variables for default font color, size etc.
266
+ // addBase({
267
+ // 'h1': { fontSize: config('theme.fontSize.2xl') },
268
+ // 'h2': { fontSize: config('theme.fontSize.xl') },
269
+ // 'h3': { fontSize: config('theme.fontSize.lg') },
270
+ // })
271
+ }),
272
+ ]
256
273
  },
257
274
  ]);
258
275
  }
package/lib/utils.js CHANGED
@@ -73,7 +73,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
73
73
  return (mod && mod.__esModule) ? mod : { "default": mod };
74
74
  };
75
75
  exports.__esModule = true;
76
- exports.flatten = exports.warn = exports.debug = exports.log = exports.generateScopedName = exports.execPromise = exports.execp = exports.getGruntConfig = exports.getModulePackageJSON = exports.getLINCDDependencies = exports.getPackageJSON = void 0;
76
+ exports.getLinkedTailwindColors = exports.flatten = exports.warn = exports.debug = exports.log = exports.generateScopedName = exports.execPromise = exports.execp = exports.getGruntConfig = exports.getModulePackageJSON = exports.getLINCDDependencies = exports.getPackageJSON = void 0;
77
77
  var fs = __importStar(require("fs"));
78
78
  var path = __importStar(require("path"));
79
79
  var chalk_1 = __importDefault(require("chalk"));
@@ -339,3 +339,10 @@ function flatten(arr) {
339
339
  }, []);
340
340
  }
341
341
  exports.flatten = flatten;
342
+ function getLinkedTailwindColors() {
343
+ return {
344
+ 'primary-color': 'var(--primary-color)',
345
+ 'font-color': 'var(--font-color)'
346
+ };
347
+ }
348
+ exports.getLinkedTailwindColors = getLinkedTailwindColors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lincd-cli",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "Command line tools for the lincd.js library",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {