create-expo-cljs-app
Version:
Create a react native application with Expo and Shadow-CLJS!
41 lines (30 loc) • 819 B
Flow
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
;
const isAbsolutePath = require('absolute-path');
import type ModuleCache from './ModuleCache';
import type Package from './Package';
class Module {
path: string;
_moduleCache: ModuleCache;
_sourceCode: ?string;
constructor(file: string, moduleCache: ModuleCache) {
if (!isAbsolutePath(file)) {
throw new Error('Expected file to be absolute path but got ' + file);
}
this.path = file;
this._moduleCache = moduleCache;
}
getPackage(): ?Package {
return this._moduleCache.getPackageForModule(this);
}
invalidate() {}
}
module.exports = Module;