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 '
33
44export {
55 torchlight ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @torchlight-api/torchlight-cli" ,
3- "version" : " 0.1.2 " ,
3+ "version" : " 0.1.3 " ,
44 "description" : " A CLI for Torchlight - the syntax highlighting API" ,
5- "main" : " index.js" ,
5+ "type" : " module" ,
6+ "exports" : " ./index.js" ,
67 "scripts" : {
78 "test" : " standard --env jest && jest" ,
89 "build" : " babel src --out-dir lib --copy-files \" --ignore\" \" src/stubs/**/*\" "
Original file line number Diff line number Diff line change 11#! /usr/bin/env node
2- import { makeProgram } from '../cli'
2+ import { makeProgram } from '../cli.js '
33
44makeProgram ( ) . parse ( )
Original file line number Diff line number Diff line change 11import 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 '
44
55export default function Block ( opts = { } ) {
66 opts = {
Original file line number Diff line number Diff line change 11import { 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 '
77
88/**
99 * Configure the commander CLI application.
Original file line number Diff line number Diff line change 11import 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 '
44import cheerio from 'cheerio'
55import chokidar from 'chokidar'
6- import log from '../support/log'
6+ import log from '../support/log.js '
77import fs from 'fs-extra'
8- import { bus , FILE_WATCHING_COMPLETE } from '../support/bus'
8+ import { bus , FILE_WATCHING_COMPLETE } from '../support/bus.js '
99
1010export default function ( torchlight , options ) {
1111 options = {
Original file line number Diff line number Diff line change 11import fs from 'fs-extra'
22import path from 'path'
33import inquirer from 'inquirer'
4- import log from '../support/log'
4+ import log from '../support/log.js '
55
66function write ( location ) {
77 const source = path . resolve ( path . join ( __dirname , '../stubs/config.js' ) )
Original file line number Diff line number Diff line change 11import fs from 'fs-extra'
22import 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 '
55
66/**
77 * @param {string|object } config
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import axios from 'axios'
22import md5 from 'md5'
33import get from 'lodash.get'
44import 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 '
77
88/**
99 * @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 ' ;
44
55process . env . TORCHLIGHT_TOKEN = 'test'
66
You can’t perform that action at this time.
0 commit comments