forked from Shopify/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
104 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
console.log('hello world'); | ||
|
||
console.log("something") | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
"include": ["./src/**/*.ts"], | ||
"exclude": ["./dist"], | ||
"references": [ | ||
{ "path": "../core" }, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "@shopify/shopify-cli-core", | ||
"version": "0.5.0", | ||
"description": "A CLI tool to build for the Shopify platform", | ||
"keywords": [ | ||
"shopify", | ||
"shopify-cli", | ||
"shopify-cli-core" | ||
], | ||
"license": "MIT", | ||
"private": false, | ||
"scripts": { | ||
"test": "vitest run", | ||
"test:watch": "vitest", | ||
"build": "rimraf dist && rollup -c", | ||
"build:watch": "rollup -c --watch --watch.include=src/**", | ||
"shopify": "rollup -c --plugin @rollup/plugin-run", | ||
"lint": "prettier -c src/** && eslint src/**", | ||
"lint:fix": "prettier src/** && eslint src/** --fix", | ||
"tsc": "tsc --noEmit" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
}, | ||
"devDependencies": {}, | ||
"peerDependencies": {}, | ||
"files": [ | ||
"dist", | ||
"*.d.ts", | ||
"*.mjs" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import esbuild from 'rollup-plugin-esbuild'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import json from '@rollup/plugin-json'; | ||
import pkg from './package.json'; | ||
import dts from 'rollup-plugin-dts' | ||
|
||
const entry = ['src/index.ts']; | ||
|
||
const external = [ | ||
...Object.keys(pkg.dependencies), | ||
...Object.keys(pkg.peerDependencies), | ||
]; | ||
|
||
export default ({ watch }) => [ | ||
{ | ||
input: entry, | ||
output: { | ||
dir: 'dist', | ||
format: 'esm', | ||
sourcemap: 'inline', | ||
}, | ||
external, | ||
plugins: [ | ||
resolve({ | ||
preferBuiltins: true, | ||
}), | ||
json(), | ||
commonjs(), | ||
esbuild({ | ||
target: 'node12', | ||
}), | ||
], | ||
onwarn(message) { | ||
if (/Circular dependencies/.test(message)) return; | ||
console.error(message); | ||
}, | ||
}, | ||
{ | ||
input: entry, | ||
output: { | ||
file: 'dist/index.d.ts', | ||
format: 'esm', | ||
}, | ||
external, | ||
plugins: [ | ||
dts(), | ||
], | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { assert, expect, it, suite, test } from 'vitest'; | ||
|
||
test('it works', () => { | ||
expect(true).toBeTruthy(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface User { | ||
name: string | ||
} | ||
|
||
export default function (): User { | ||
return {name: "Pedro"} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../../configurations/tsconfig.json", | ||
"include": ["./src/**/*.ts"], | ||
"exclude": ["./dist"], | ||
"references": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"references": [ | ||
{ "path": "packages/cli" } | ||
{ "path": "./packages/core" }, | ||
{ "path": "./packages/cli" } | ||
], | ||
"files": [] | ||
} |