@moneko/core 3.29.1 → 3.29.3

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.
@@ -1,2 +1,2 @@
1
- import{relative as e}from"node:path";import{argv as t}from"node:process";import{ink as o,print as i}from"@moneko/utils";import{ESLint as r}from"eslint";import{cachePath as s,cwd as a,parseBraced as c}from"./utils/config.mjs";export default async function l(){let l=o("eslint","cyan");i(`${l}: ${o("Runing...","yellow")}`,!0);let n=t[3],m=t.slice(4),f=m.includes("--fix"),u=new r({cache:!m.includes("--cache=false"),cacheLocation:`${s}/.eslintcache`,fix:f}),p=await u.lintFiles(c(n).map(t=>e(a,t))),d=await u.loadFormatter("stylish"),w=await d.format(p);f&&await r.outputFixes(p),w&&process.stdout.write(w);let h=p.some(e=>e.errorCount>0);i(`${l}: ${o(`✨ ${h?"Error":"Successfully"}!
2
- `,h?"red":"green")}`,!0),h&&process.exit(1)}
1
+ import{relative as e}from"node:path";import{argv as t}from"node:process";import{ink as o,print as i}from"@moneko/utils";import{ESLint as r}from"eslint";import{cachePath as s,cwd as a,parseBraced as c}from"./utils/config.mjs";export default async function l(){let l=o("eslint","cyan");i(`${l}: ${o("Runing...","yellow")}`,!0);let n=t[3],m=t.slice(4),f=m.includes("--fix"),u=new r({cache:!m.includes("--cache=false"),cacheLocation:`${s}/.eslintcache`,fix:f}),p=c(n).map(t=>e(a,t)),d=await u.lintFiles(p),w=await u.loadFormatter("stylish"),h=await w.format(d);f&&await r.outputFixes(d),h&&process.stdout.write(h);let $=d.some(e=>e.errorCount>0);i(`${l}: ${o(`✨ ${$?"Error":"Successfully"}!
2
+ `,$?"red":"green")}`,!0),$&&process.exit(1)}
@@ -0,0 +1,29 @@
1
+ import { spawnSync, type SpawnSyncReturns } from 'node:child_process';
2
+ import { readFile } from 'node:fs/promises';
3
+ import { join } from 'node:path';
4
+ import { argv } from 'node:process';
5
+ import { stylelint as Stylelint } from '@moneko/stylelint';
6
+ import { ESLint } from 'eslint';
7
+ declare function parseArgs<T>(args: string[]): T;
8
+ type Args = {
9
+ fix?: boolean;
10
+ cache?: boolean;
11
+ mode?: 'ci' | 'commit';
12
+ };
13
+ declare const args: Args;
14
+ declare const fix: boolean | undefined;
15
+ declare const cache: boolean;
16
+ declare const cwd: string;
17
+ declare const cachePath: string;
18
+ declare const cmd: {
19
+ readonly ci: readonly ['diff', '--name-only', 'HEAD^', 'HEAD'];
20
+ readonly commit: readonly ['diff', '--cached', '--name-only', '--diff-filter=ACMR'];
21
+ };
22
+ declare const scriptRegExp: RegExp;
23
+ declare const vueRegExp: RegExp;
24
+ declare const styleRegExp: RegExp;
25
+ declare const child: SpawnSyncReturns<Buffer<ArrayBufferLike>>;
26
+ declare const lintFiles: string[];
27
+ export declare async function eslint();
28
+ declare const styleFiles: string[];
29
+ export declare async function stylelint();
@@ -0,0 +1 @@
1
+ import{spawnSync as t}from"node:child_process";import{readFile as e}from"node:fs/promises";import{join as o}from"node:path";import{argv as i}from"node:process";import{stylelint as s}from"@moneko/stylelint";import{ESLint as r}from"eslint";let n=Object.fromEntries(i.slice(2).map(function(t){let e=t.split("="),o=e[1];return void 0===o||"true"===o?o=!0:"false"===o?o=!1:/-?\d+(\.\d+)?([eE][+-]?\d+)?/.test(o)&&(o=parseFloat(o)),[e[0].replace(/^--/,""),o]})),l=n.fix,c=n.cache||!0,a=o(process.cwd(),"node_modules/.cache"),m={ci:["diff","--name-only","HEAD^","HEAD"],commit:["diff","--cached","--name-only","--diff-filter=ACMR"]},d=/.*(?<!\.d)\.(j|t|mj|mt|cj|ct)sx?$/,f=/.*(?<!\.d)\.vue$/,p=/.*(?<!\.d)\.(c|sc|sa|le)ss$/,u=t("git",m[n.mode||"ci"]||m.ci).stdout.toString().trim().split("\n");export async function eslint(){console.log("ESLint runing..."),console.time("ESLint");let t=new r({cache:c,cacheLocation:`${a}/.eslintcache`,fix:l}),e=u.filter(t=>d.test(t)||f.test(t)),o=await t.lintFiles(e),i=await t.loadFormatter("stylish"),s=await i.format(o);l&&await r.outputFixes(o),s&&process.stdout.write(s);let n=o.some(t=>t.errorCount>0);console.timeEnd("ESLint"),n&&process.exit(1)}let y=u.filter(t=>p.test(t)||f.test(t));export async function stylelint(){console.log("Stylelint runing..."),console.time("Stylelint");let t=await Promise.all(y.map(async t=>{let o=await e(t,{encoding:"utf-8"});return await s.lint({codeFilename:t,code:o,cache:c,cacheLocation:`${a}/.stylelintcache`,fix:l,formatter:"string"}).catch(console.log)})),o=!1;t.forEach(t=>{t&&(t.report&&process.stdout.write(t.report),t.errored&&(o=!!t.errored))}),console.timeEnd("Stylelint"),o&&process.exit(1)}
@@ -0,0 +1,3 @@
1
+ import { type ChildProcessWithoutNullStreams, spawn } from 'node:child_process';
2
+ declare function getCommitFiles();
3
+ export default getCommitFiles;
@@ -0,0 +1 @@
1
+ import{spawn as t}from"node:child_process";export default function(){return new Promise(function(n,o){let r=t("git",["diff","--name-only","HEAD^","HEAD"]),i="",e="";r.stdout.on("data",function(t){i+=t.toString()}),r.stderr.on("data",function(t){e+=t.toString()}),r.on("close",function(t){0===t?n(i.trim().split("\n")):o({code:t,error:e})})})}
@@ -0,0 +1,2 @@
1
+ declare function parseArgs(args: string[]);
2
+ export default parseArgs;
@@ -0,0 +1 @@
1
+ export default function(e){return Object.fromEntries(e.map(function(e){let t=e.split("="),r=t[1];return void 0===r||"true"===r?r=!0:"false"===r?r=!1:/-?\d+(\.\d+)?([eE][+-]?\d+)?/.test(r)&&(r=parseFloat(r)),[t[0].replace(/^--/,""),r]}))}
@@ -2,7 +2,6 @@ import { join } from 'node:path';
2
2
  import { getAppEntry, getAppFallback, getAppMdxScope, getAppMergeRouter, getAppNormalizeCss, getAppPrefixRouter, getAppRem, getAppSuspense } from '@moneko/mdx';
3
3
  import { updateFileSync } from '@moneko/utils';
4
4
  import hasPkg from '../commom/has-pkg.mjs';
5
- import parseModuleMeta from '../commom/parse-module-meta.mjs';
6
5
  import paths from '../commom/paths.mjs';
7
6
  import Rule from '../commom/rule.mjs';
8
7
  import { CONFIG } from '../config.mjs';
@@ -1 +1 @@
1
- import{join as m}from"node:path";import{getAppEntry as o,getAppFallback as p,getAppMdxScope as e,getAppMergeRouter as t,getAppNormalizeCss as r,getAppPrefixRouter as s,getAppRem as a,getAppSuspense as i}from"@moneko/mdx";import{updateFileSync as n}from"@moneko/utils";import f from"../commom/has-pkg.mjs";import l from"../commom/parse-module-meta.mjs";import d from"../commom/paths.mjs";import c from"../commom/rule.mjs";import{CONFIG as x}from"../config.mjs";import u from"../plugin/module-federation.mjs";import{APPTYPE as j,FRAMEWORK as g}from"../process-env.mjs";import y from"../utils/create-types.mjs";import{generateDeclaration as v}from"../utils/dts.mjs";import{node_modules as h}from"../utils/index.mjs";import k from"./coverage.mjs";import{docs as O,docsModuleName as S}from"./docs.mjs";import b from"./info.mjs";import{locales as z,localesModuleName as D}from"./locales.mjs";import J from"./render-app.mjs";import{route as N,routesModuleName as $}from"./routes.mjs";let C=f(m(x.alias["@"],"./mdx-scope.tsx"))||f(m(x.alias["@"],"./mdx-scope.ts")),P={"@app/env.ts":`export default ${JSON.stringify(x.env)}`,"@app/info.ts":`export default ${JSON.stringify(b)}`,"@app/render.tsx":"react"===g?J:"","@app/entry.ts":o(m(x.alias["@"],"./index.ts"),!!u.length,!!x.rem,!!x.normalizeCss,j,g),"@app/rem":a(x.rem?.designSize||1680),"@app/fallback":p(x.fallbackCompPath),"@app/coverage":k(d.coveragePath),"@app/merge-router":t(),"@app/prefix-router":s(),"@app/normalize/index.css":r(),"@app/suspense/index.tsx":i(j,g),"@app/mdx-scope.tsx":C?e(C):"export default {}","@app/routes":N.getData($),"@app/locales":z.getData(D),"@app/docs":O.getData(S)};n(h("@types/@app/index.d.ts"),["@app/env.ts","@app/info.ts","@app/entry.ts","@app/mdx-scope.tsx"].map(m=>y(m.replace(c.js,""),v(P[m],m))).join("\n"));let M=h("@types/@vm/index.d.ts"),q=x.virtualModule||{};n(M,Object.keys(q).map(m=>{let o=q[m],{file:p}=l(m);return y(m,v("string"==typeof o?o:`export default ${JSON.stringify(o)}`,p))}).join("\n"));export default P;
1
+ import{join as p}from"node:path";import{getAppEntry as e,getAppFallback as t,getAppMdxScope as o,getAppMergeRouter as m,getAppNormalizeCss as r,getAppPrefixRouter as s,getAppRem as a,getAppSuspense as i}from"@moneko/mdx";import{updateFileSync as n}from"@moneko/utils";import f from"../commom/has-pkg.mjs";import l from"../commom/paths.mjs";import d from"../commom/rule.mjs";import{CONFIG as c}from"../config.mjs";import x from"../plugin/module-federation.mjs";import{APPTYPE as u,FRAMEWORK as j}from"../process-env.mjs";import g from"../utils/create-types.mjs";import{generateDeclaration as y}from"../utils/dts.mjs";import{node_modules as v}from"../utils/index.mjs";import h from"./coverage.mjs";import{docs as k,docsModuleName as O}from"./docs.mjs";import S from"./info.mjs";import{locales as b,localesModuleName as z}from"./locales.mjs";import D from"./render-app.mjs";import{route as J,routesModuleName as N}from"./routes.mjs";let $=f(p(c.alias["@"],"./mdx-scope.tsx"))||f(p(c.alias["@"],"./mdx-scope.ts")),C={"@app/env.ts":`export default ${JSON.stringify(c.env)}`,"@app/info.ts":`export default ${JSON.stringify(S)}`,"@app/render.tsx":"react"===j?D:"","@app/entry.ts":e(p(c.alias["@"],"./index.ts"),!!x.length,!!c.rem,!!c.normalizeCss,u,j),"@app/rem":a(c.rem?.designSize||1680),"@app/fallback":t(c.fallbackCompPath),"@app/coverage":h(l.coveragePath),"@app/merge-router":m(),"@app/prefix-router":s(),"@app/normalize/index.css":r(),"@app/suspense/index.tsx":i(u,j),"@app/mdx-scope.tsx":$?o($):"export default {}","@app/routes":J.getData(N),"@app/locales":b.getData(z),"@app/docs":k.getData(O)};n(v("@types/@app/index.d.ts"),["@app/env.ts","@app/info.ts","@app/entry.ts","@app/mdx-scope.tsx"].map(p=>g(p.replace(d.js,""),y(C[p],p))).join("\n"));let P=v("@types/@vm/index.d.ts"),M=c.virtualModule||{};n(P,Object.keys(M).map(p=>{let e=M[p];return g(p,y("string"==typeof e?e:`export default ${JSON.stringify(e)}`,p))}).join("\n"));export default C;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.29.1",
3
+ "version": "3.29.3",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "@fastify/middie": "8.3.3",
21
21
  "@moneko/convert": "1.0.0",
22
22
  "@moneko/mdx": "0.1.43",
23
- "@moneko/raw-import": "0.0.2",
23
+ "@moneko/raw-import": "0.0.3",
24
24
  "@moneko/stylelint": "1.0.2",
25
25
  "@moneko/transform-imports": "0.6.1",
26
26
  "@moneko/utils": "0.1.22",
@@ -38,7 +38,7 @@
38
38
  "style-loader": "4.0.0",
39
39
  "swc-loader": "0.2.6",
40
40
  "typescript": "5.5.4",
41
- "webpack": "5.97.1",
41
+ "webpack": "5.98.0",
42
42
  "webpack-dev-middleware": "7.4.2",
43
43
  "webpack-hot-middleware": "2.26.1",
44
44
  "webpack-merge": "6.0.1",
@@ -50,12 +50,12 @@
50
50
  "@types/stylis": "4.2.7",
51
51
  "@types/webpack-bundle-analyzer": "4.7.0",
52
52
  "@types/webpack-hot-middleware": "2.25.9",
53
- "babel-plugin-react-compiler": "19.0.0-beta-714736e-20250131",
54
- "eslint-config-neko": "3.0.4",
55
- "sass": "1.83.4",
53
+ "babel-plugin-react-compiler": "19.0.0-beta-21e868a-20250216",
54
+ "eslint-config-neko": "3.0.5",
55
+ "sass": "1.85.1",
56
56
  "sass-loader": "16.0.4",
57
57
  "solid-refresh": "0.7.5",
58
- "stylis": "4.3.5",
58
+ "stylis": "4.3.6",
59
59
  "webpack-bundle-analyzer": "4.10.2"
60
60
  },
61
61
  "files": [
@@ -1,36 +0,0 @@
1
- import path from 'node:path';
2
- import { copyFile, ink, println, scanFolderSync, updateFile } from '@moneko/utils';
3
- import { JsMinifyOptions, type Options, type Output, transformFile } from '@swc/core';
4
- declare function getOutfilePath(outDir: string, file: string, outFileExtension?: string);
5
- interface ConvertOptions {
6
- outDir: string;
7
- inputDir: string;
8
- options: Options;
9
- ignore?: RegExp[];
10
- extensions?: string[];
11
- copy?: boolean;
12
- quiet?: boolean;
13
- outputExtension?: string;
14
- }
15
- interface ConvertResult {
16
- duration: number;
17
- compiled: string[];
18
- copied: string[];
19
- failed: string[];
20
- }
21
- interface ConvertOutput extends Output {
22
- output?: string;
23
- }
24
- declare const normalizeExtension: Record<string, string>;
25
- declare const jscMinify: JsMinifyOptions;
26
- declare async function convert({ ignore = [], quiet = true, copy = true, outDir, outputExtension, inputDir, options, extensions = [
27
- '.ts',
28
- '.js',
29
- '.tsx',
30
- '.jsx',
31
- '.mts',
32
- '.mjs',
33
- '.cts',
34
- '.cjs'
35
- ] }: ConvertOptions);
36
- export default convert;
File without changes
@@ -1,13 +0,0 @@
1
- import { transformSync } from '@swc/core';
2
- import swcrc, { SwcOption } from '../options/swcrc.mjs';
3
- import { isDev } from '../process-env.mjs';
4
- import info from '../vm/info.mjs';
5
- declare const version: number;
6
- declare const ReactDomPath: string;
7
- declare const isHashRouter: boolean;
8
- declare const v7Future: Record<string, boolean | undefined>;
9
- declare const createRouter: string;
10
- declare const code: string;
11
- declare const swcOption: SwcOption;
12
- declare const reactRenderApp: string;
13
- export default reactRenderApp;
@@ -1,41 +0,0 @@
1
- import{transformSync as e}from"@swc/core";import r from"../options/swcrc.mjs";import{isDev as t}from"../process-env.mjs";import o from"../vm/info.mjs";let a=parseFloat(o.frameworkVersion),n="hash"===o.routerMode,s=Object.assign({v7_relativeSplatPath:!1},"browser"===o.routerMode?{v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:o.ssr,v7_skipActionErrorRevalidation:!1}:{}),c=n?"createHashRouter":"createBrowserRouter",p=`import React, { StrictMode, useRef, type ReactElement } from 'react';
2
- import Fallback from '@app/fallback';
3
- import routes from '@app/routes';
4
- import ReactDOM from '${a<18?"react-dom":"react-dom/client"}';
5
- import { RouterProvider, ${c} } from 'react-router-dom';
6
-
7
- type RenderAppProps = {
8
- container?: HTMLElement;
9
- basename?: string;
10
- fallback?: ReactElement;
11
- language?: string;
12
- };
13
-
14
- export function App(props: RenderAppProps) {
15
- const v7Future = useRef(${JSON.stringify(s)});
16
- return (
17
- <StrictMode>
18
- <RouterProvider
19
- router={${c}(routes, {
20
- basename: ${n?"/":"props.basename"},
21
- window: window,
22
- future: v7Future.current,
23
- })}
24
- future={{
25
- /** 这使用 useTransition 而不是 useState 来更新路由器状态 */
26
- v7_startTransition: false,
27
- }}
28
- fallbackElement={Fallback && <Fallback />}
29
- />
30
- </StrictMode>
31
- );
32
- }
33
-
34
- function renderApp(props: RenderAppProps = {}) {
35
- const { container, basename = "${o.base}", language, ...args } = props;
36
- const _container = container?.querySelector('#root') || document.getElementById('root');
37
- ${"micro"===o.type?"window.mainApp = { ...args, container: _container as HTMLElement };":""}
38
- ${a<18?`ReactDOM.${t?"render":"hydrate"}(<App basename={basename} language={language} />, _container);return () => ReactDOM.unmountComponentAtNode(_container as Element);`:"const instance = ReactDOM.createRoot(_container as HTMLElement);instance.render(<App basename={basename} language={language} />);return instance.unmount;"}
39
- }
40
-
41
- export default renderApp;`,i=r(o.ssr);delete i.sync,delete i.parseMap;let m=e(p,i).code;console.log(m);export default m;
@@ -1,388 +0,0 @@
1
- {
2
- "type": "Module",
3
- "span": {
4
- "start": 1194957,
5
- "end": 1195243,
6
- "ctxt": 0
7
- },
8
- "body": [
9
- {
10
- "type": "ImportDeclaration",
11
- "span": {
12
- "start": 1194957,
13
- "end": 1194991,
14
- "ctxt": 0
15
- },
16
- "specifiers": [
17
- {
18
- "type": "ImportSpecifier",
19
- "span": {
20
- "start": 1194966,
21
- "end": 1194969,
22
- "ctxt": 0
23
- },
24
- "local": {
25
- "type": "Identifier",
26
- "span": {
27
- "start": 1194966,
28
- "end": 1194969,
29
- "ctxt": 2
30
- },
31
- "value": "css",
32
- "optional": false
33
- },
34
- "imported": null,
35
- "isTypeOnly": false
36
- }
37
- ],
38
- "source": {
39
- "type": "StringLiteral",
40
- "span": {
41
- "start": 1194977,
42
- "end": 1194990,
43
- "ctxt": 0
44
- },
45
- "value": "@moneko/css",
46
- "raw": "'@moneko/css'"
47
- },
48
- "typeOnly": false,
49
- "with": null,
50
- "phase": "evaluation"
51
- },
52
- {
53
- "type": "ImportDeclaration",
54
- "span": {
55
- "start": 1194992,
56
- "end": 1195030,
57
- "ctxt": 0
58
- },
59
- "specifiers": [
60
- {
61
- "type": "ImportSpecifier",
62
- "span": {
63
- "start": 1195001,
64
- "end": 1195011,
65
- "ctxt": 0
66
- },
67
- "local": {
68
- "type": "Identifier",
69
- "span": {
70
- "start": 1195001,
71
- "end": 1195011,
72
- "ctxt": 2
73
- },
74
- "value": "createMemo",
75
- "optional": false
76
- },
77
- "imported": null,
78
- "isTypeOnly": false
79
- }
80
- ],
81
- "source": {
82
- "type": "StringLiteral",
83
- "span": {
84
- "start": 1195019,
85
- "end": 1195029,
86
- "ctxt": 0
87
- },
88
- "value": "solid-js",
89
- "raw": "'solid-js'"
90
- },
91
- "typeOnly": false,
92
- "with": null,
93
- "phase": "evaluation"
94
- },
95
- {
96
- "type": "FunctionDeclaration",
97
- "identifier": {
98
- "type": "Identifier",
99
- "span": {
100
- "start": 1195040,
101
- "end": 1195041,
102
- "ctxt": 2
103
- },
104
- "value": "A",
105
- "optional": false
106
- },
107
- "declare": false,
108
- "params": [],
109
- "decorators": [],
110
- "span": {
111
- "start": 1195031,
112
- "end": 1195225,
113
- "ctxt": 3
114
- },
115
- "body": {
116
- "type": "BlockStatement",
117
- "span": {
118
- "start": 1195044,
119
- "end": 1195225,
120
- "ctxt": 3
121
- },
122
- "stmts": [
123
- {
124
- "type": "VariableDeclaration",
125
- "span": {
126
- "start": 1195050,
127
- "end": 1195152,
128
- "ctxt": 0
129
- },
130
- "kind": "const",
131
- "declare": false,
132
- "declarations": [
133
- {
134
- "type": "VariableDeclarator",
135
- "span": {
136
- "start": 1195056,
137
- "end": 1195151,
138
- "ctxt": 0
139
- },
140
- "id": {
141
- "type": "Identifier",
142
- "span": {
143
- "start": 1195056,
144
- "end": 1195059,
145
- "ctxt": 3
146
- },
147
- "value": "ass",
148
- "optional": false,
149
- "typeAnnotation": null
150
- },
151
- "init": {
152
- "type": "CallExpression",
153
- "span": {
154
- "start": 1195062,
155
- "end": 1195151,
156
- "ctxt": 0
157
- },
158
- "callee": {
159
- "type": "Identifier",
160
- "span": {
161
- "start": 1195062,
162
- "end": 1195072,
163
- "ctxt": 2
164
- },
165
- "value": "createMemo",
166
- "optional": false
167
- },
168
- "arguments": [
169
- {
170
- "spread": null,
171
- "expression": {
172
- "type": "ArrowFunctionExpression",
173
- "span": {
174
- "start": 1195073,
175
- "end": 1195150,
176
- "ctxt": 0
177
- },
178
- "params": [],
179
- "body": {
180
- "type": "BlockStatement",
181
- "span": {
182
- "start": 1195077,
183
- "end": 1195150,
184
- "ctxt": 4
185
- },
186
- "stmts": [
187
- {
188
- "type": "VariableDeclaration",
189
- "span": {
190
- "start": 1195087,
191
- "end": 1195126,
192
- "ctxt": 0
193
- },
194
- "kind": "const",
195
- "declare": false,
196
- "declarations": [
197
- {
198
- "type": "VariableDeclarator",
199
- "span": {
200
- "start": 1195093,
201
- "end": 1195125,
202
- "ctxt": 0
203
- },
204
- "id": {
205
- "type": "Identifier",
206
- "span": {
207
- "start": 1195093,
208
- "end": 1195094,
209
- "ctxt": 4
210
- },
211
- "value": "s",
212
- "optional": false,
213
- "typeAnnotation": null
214
- },
215
- "init": {
216
- "type": "TaggedTemplateExpression",
217
- "span": {
218
- "start": 1195097,
219
- "end": 1195125,
220
- "ctxt": 0
221
- },
222
- "tag": {
223
- "type": "Identifier",
224
- "span": {
225
- "start": 1195097,
226
- "end": 1195100,
227
- "ctxt": 2
228
- },
229
- "value": "css",
230
- "optional": false
231
- },
232
- "typeParameters": null,
233
- "template": {
234
- "type": "TemplateLiteral",
235
- "span": {
236
- "start": 1195100,
237
- "end": 1195125,
238
- "ctxt": 0
239
- },
240
- "expressions": [],
241
- "quasis": [
242
- {
243
- "type": "TemplateElement",
244
- "span": {
245
- "start": 1195101,
246
- "end": 1195124,
247
- "ctxt": 0
248
- },
249
- "tail": true,
250
- "cooked": "\n color: red;\n ",
251
- "raw": "\n color: red;\n "
252
- }
253
- ]
254
- }
255
- },
256
- "definite": false
257
- }
258
- ]
259
- },
260
- {
261
- "type": "ReturnStatement",
262
- "span": {
263
- "start": 1195135,
264
- "end": 1195144,
265
- "ctxt": 0
266
- },
267
- "argument": {
268
- "type": "Identifier",
269
- "span": {
270
- "start": 1195142,
271
- "end": 1195143,
272
- "ctxt": 4
273
- },
274
- "value": "s",
275
- "optional": false
276
- }
277
- }
278
- ]
279
- },
280
- "async": false,
281
- "generator": false,
282
- "typeParameters": null,
283
- "returnType": null
284
- }
285
- }
286
- ],
287
- "typeArguments": null
288
- },
289
- "definite": false
290
- }
291
- ]
292
- },
293
- {
294
- "type": "ReturnStatement",
295
- "span": {
296
- "start": 1195157,
297
- "end": 1195223,
298
- "ctxt": 0
299
- },
300
- "argument": {
301
- "type": "BinaryExpression",
302
- "span": {
303
- "start": 1195164,
304
- "end": 1195222,
305
- "ctxt": 0
306
- },
307
- "operator": "+",
308
- "left": {
309
- "type": "TaggedTemplateExpression",
310
- "span": {
311
- "start": 1195164,
312
- "end": 1195216,
313
- "ctxt": 0
314
- },
315
- "tag": {
316
- "type": "Identifier",
317
- "span": {
318
- "start": 1195164,
319
- "end": 1195167,
320
- "ctxt": 2
321
- },
322
- "value": "css",
323
- "optional": false
324
- },
325
- "typeParameters": null,
326
- "template": {
327
- "type": "TemplateLiteral",
328
- "span": {
329
- "start": 1195167,
330
- "end": 1195216,
331
- "ctxt": 0
332
- },
333
- "expressions": [],
334
- "quasis": [
335
- {
336
- "type": "TemplateElement",
337
- "span": {
338
- "start": 1195168,
339
- "end": 1195215,
340
- "ctxt": 0
341
- },
342
- "tail": true,
343
- "cooked": "\n .body {\n color: red;\n }\n ",
344
- "raw": "\n .body {\n color: red;\n }\n "
345
- }
346
- ]
347
- }
348
- },
349
- "right": {
350
- "type": "Identifier",
351
- "span": {
352
- "start": 1195219,
353
- "end": 1195222,
354
- "ctxt": 3
355
- },
356
- "value": "ass",
357
- "optional": false
358
- }
359
- }
360
- }
361
- ]
362
- },
363
- "generator": false,
364
- "async": false,
365
- "typeParameters": null,
366
- "returnType": null
367
- },
368
- {
369
- "type": "ExportDefaultExpression",
370
- "span": {
371
- "start": 1195226,
372
- "end": 1195243,
373
- "ctxt": 0
374
- },
375
- "expression": {
376
- "type": "Identifier",
377
- "span": {
378
- "start": 1195241,
379
- "end": 1195242,
380
- "ctxt": 2
381
- },
382
- "value": "A",
383
- "optional": false
384
- }
385
- }
386
- ],
387
- "interpreter": null
388
- }