File tree Expand file tree Collapse file tree 11 files changed +28
-27
lines changed Expand file tree Collapse file tree 11 files changed +28
-27
lines changed Original file line number Diff line number Diff line change 1
- import torchlight from './src/torchlight'
2
- import Block from './src/block'
1
+ import torchlight from './src/torchlight.js '
2
+ import Block from './src/block.js '
3
3
4
4
export {
5
5
torchlight ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @torchlight-api/torchlight-cli" ,
3
- "version" : " 0.1.2 " ,
3
+ "version" : " 0.1.3 " ,
4
4
"description" : " A CLI for Torchlight - the syntax highlighting API" ,
5
- "main" : " index.js" ,
5
+ "type" : " module" ,
6
+ "exports" : " ./index.js" ,
6
7
"scripts" : {
7
8
"test" : " standard --env jest && jest" ,
8
9
"build" : " babel src --out-dir lib --copy-files \" --ignore\" \" src/stubs/**/*\" "
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env node
2
- import { makeProgram } from '../cli'
2
+ import { makeProgram } from '../cli.js '
3
3
4
4
makeProgram ( ) . parse ( )
Original file line number Diff line number Diff line change 1
1
import md5 from 'md5'
2
- import guid from './support/guid'
3
- import torchlight from './torchlight'
2
+ import guid from './support/guid.js '
3
+ import torchlight from './torchlight.js '
4
4
5
5
export default function Block ( opts = { } ) {
6
6
opts = {
Original file line number Diff line number Diff line change 1
1
import { program } from 'commander'
2
- import torchlight from './torchlight'
3
- import highlight from './commands/highlight'
4
- import init from './commands/init'
5
- import cacheClear from './commands/cache/clear'
6
- import { makeConfig , makeCache } from './config'
2
+ import torchlight from './torchlight.js '
3
+ import highlight from './commands/highlight.js '
4
+ import init from './commands/init.js '
5
+ import cacheClear from './commands/cache/clear.js '
6
+ import { makeConfig , makeCache } from './config.js '
7
7
8
8
/**
9
9
* Configure the commander CLI application.
Original file line number Diff line number Diff line change 1
1
import path from 'path'
2
- import torchlight from '../torchlight'
3
- import Block from '../block'
2
+ import torchlight from '../torchlight.js '
3
+ import Block from '../block.js '
4
4
import cheerio from 'cheerio'
5
5
import chokidar from 'chokidar'
6
- import log from '../support/log'
6
+ import log from '../support/log.js '
7
7
import fs from 'fs-extra'
8
- import { bus , FILE_WATCHING_COMPLETE } from '../support/bus'
8
+ import { bus , FILE_WATCHING_COMPLETE } from '../support/bus.js '
9
9
10
10
export default function ( torchlight , options ) {
11
11
options = {
Original file line number Diff line number Diff line change 1
1
import fs from 'fs-extra'
2
2
import path from 'path'
3
3
import inquirer from 'inquirer'
4
- import log from '../support/log'
4
+ import log from '../support/log.js '
5
5
6
6
function write ( location ) {
7
7
const source = path . resolve ( path . join ( __dirname , '../stubs/config.js' ) )
Original file line number Diff line number Diff line change 1
1
import fs from 'fs-extra'
2
2
import path from 'path'
3
- import FileCache from './cache/file'
4
- import MemoryCache from './cache/memory'
3
+ import FileCache from './cache/file.js '
4
+ import MemoryCache from './cache/memory.js '
5
5
6
6
/**
7
7
* @param {string|object } config
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import axios from 'axios'
2
2
import md5 from 'md5'
3
3
import get from 'lodash.get'
4
4
import chunk from 'lodash.chunk'
5
- import log from './support/log'
6
- import MemoryCache from './cache/memory'
5
+ import log from './support/log.js '
6
+ import MemoryCache from './cache/memory.js '
7
7
8
8
/**
9
9
* @constructor
Original file line number Diff line number Diff line change 1
- import torchlight from '../src/torchlight' ;
2
- import { mockApi , fixture } from './support/helpers' ;
3
- import log from '../src/support/log' ;
1
+ import torchlight from '../src/torchlight.js ' ;
2
+ import { mockApi , fixture } from './support/helpers.js ' ;
3
+ import log from '../src/support/log.js ' ;
4
4
5
5
process . env . TORCHLIGHT_TOKEN = 'test'
6
6
You can’t perform that action at this time.
0 commit comments