Create type definition for '*/package.json' (#4014)
* Create type definition for '*/package.json' * Update tsconfig.json
This commit is contained in:
parent
8dc7f28744
commit
e909eac296
6 changed files with 9 additions and 6 deletions
3
src/@types/package.json.d.ts
vendored
Normal file
3
src/@types/package.json.d.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
declare module '*/package.json' {
|
||||||
|
const version: string;
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ import { URL } from 'url';
|
||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
import { Source, Mixin } from './types';
|
import { Source, Mixin } from './types';
|
||||||
import isUrl = require('is-url');
|
import isUrl = require('is-url');
|
||||||
const pkg = require('../../package.json');
|
import * as pkg from '../../package.json';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Path of configuration directory
|
* Path of configuration directory
|
||||||
|
|
|
@ -23,6 +23,7 @@ import notesStats from './daemons/notes-stats';
|
||||||
import loadConfig from './config/load';
|
import loadConfig from './config/load';
|
||||||
import { Config } from './config/types';
|
import { Config } from './config/types';
|
||||||
import { lessThan } from './prelude/array';
|
import { lessThan } from './prelude/array';
|
||||||
|
import * as pkg from '../package.json';
|
||||||
|
|
||||||
const clusterLog = debug('misskey:cluster');
|
const clusterLog = debug('misskey:cluster');
|
||||||
const ev = new Xev();
|
const ev = new Xev();
|
||||||
|
@ -31,8 +32,6 @@ if (process.env.NODE_ENV != 'production' && process.env.DEBUG == null) {
|
||||||
debug.enable('misskey');
|
debug.enable('misskey');
|
||||||
}
|
}
|
||||||
|
|
||||||
const pkg = require('../package.json');
|
|
||||||
|
|
||||||
//#region Command line argument definitions
|
//#region Command line argument definitions
|
||||||
program
|
program
|
||||||
.version(pkg.version)
|
.version(pkg.version)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import config from '../../../config';
|
||||||
import Emoji from '../../../models/emoji';
|
import Emoji from '../../../models/emoji';
|
||||||
import define from '../define';
|
import define from '../define';
|
||||||
import fetchMeta from '../../../misc/fetch-meta';
|
import fetchMeta from '../../../misc/fetch-meta';
|
||||||
|
import * as pkg from '../../../../package.json';
|
||||||
|
|
||||||
const pkg = require('../../../../package.json');
|
|
||||||
const client = require('../../../../built/client/meta.json');
|
const client = require('../../../../built/client/meta.json');
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
|
|
|
@ -20,7 +20,7 @@ import Note, { pack as packNote } from '../../models/note';
|
||||||
import getNoteSummary from '../../misc/get-note-summary';
|
import getNoteSummary from '../../misc/get-note-summary';
|
||||||
import fetchMeta from '../../misc/fetch-meta';
|
import fetchMeta from '../../misc/fetch-meta';
|
||||||
import Emoji from '../../models/emoji';
|
import Emoji from '../../models/emoji';
|
||||||
const pkg = require('../../../package.json');
|
import * as pkg from '../../../package.json';
|
||||||
|
|
||||||
const client = `${__dirname}/../../client/`;
|
const client = `${__dirname}/../../client/`;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictNullChecks": false,
|
"strictNullChecks": false,
|
||||||
"experimentalDecorators": true
|
"experimentalDecorators": true,
|
||||||
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"include": [
|
"include": [
|
||||||
|
|
Loading…
Reference in a new issue