Skip to content

Commit

Permalink
refactor: use generateStylableJSModuleSource from core
Browse files Browse the repository at this point in the history
  • Loading branch information
barak007 committed Jul 16, 2023
1 parent 6dac769 commit 4becd34
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions packages/cli/src/build-single-file.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import type { Stylable, StylableResults } from '@stylable/core';
import { type Stylable, type StylableResults, generateStylableJSModuleSource } from '@stylable/core';
import { isAsset, isRelativeNativeCss } from '@stylable/core/dist/index-internal';
import {
generateDTSContent,
generateDTSSourceMap,
generateStylableJSModuleSource,
} from '@stylable/module-utils';
import { generateDTSContent, generateDTSSourceMap } from '@stylable/module-utils';
import { StylableOptimizer } from '@stylable/optimizer';
import type { IFileSystem } from '@file-services/types';
import { hasImportedSideEffects, processUrlDependencies } from '@stylable/build-tools';
Expand Down
1 change: 0 additions & 1 deletion packages/esbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@stylable/build-tools": "^5.14.0",
"@stylable/cli": "^5.14.0",
"@stylable/core": "^5.14.0",
"@stylable/module-utils": "^5.14.0",
"@stylable/node": "^5.14.0",
"@stylable/optimizer": "^5.14.0",
"@stylable/runtime": "^5.14.0",
Expand Down
8 changes: 6 additions & 2 deletions packages/esbuild/src/stylable-esbuild-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import fs, { readFileSync, writeFileSync } from 'fs';
import { relative, join, isAbsolute, dirname } from 'path';
import type { Plugin, PluginBuild } from 'esbuild';
import { Stylable, StylableConfig, StylableResults } from '@stylable/core';
import {
Stylable,
StylableConfig,
StylableResults,
generateStylableJSModuleSource,
} from '@stylable/core';
import { StylableOptimizer } from '@stylable/optimizer';
import { resolveNamespace as resolveNamespaceNode } from '@stylable/node';
import { generateStylableJSModuleSource } from '@stylable/module-utils';
import { collectImportsWithSideEffects } from '@stylable/build-tools';
import { resolveConfig, buildDTS } from '@stylable/cli';
import type { DiagnosticsMode } from '@stylable/core/dist/index-internal';
Expand Down
1 change: 0 additions & 1 deletion packages/esbuild/src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{ "path": "../../core/src" },
{ "path": "../../cli/src" },
{ "path": "../../node/src" },
{ "path": "../../module-utils/src" },
{ "path": "../../optimizer/src" }
]
}
2 changes: 2 additions & 0 deletions packages/module-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ Creates a factory for creating multiple Stylable modules in a shared context, us

Creates a single Stylable module source code.

> This function moved to `@stylable/core` and will be removed in the next major version.
## License
Copyright (c) 2017 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by an [MIT license](./LICENSE).

0 comments on commit 4becd34

Please sign in to comment.