如果我有一棵树,看起来像:
\n\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 project\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 package\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 setup.py\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 env\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 setup.py\nRun Code Online (Sandbox Code Playgroud)\n\n有没有办法将嵌套的 setup.py 包含在顶部 setup.py 的安装中?我想避免这种情况:
\n\npip install -e . ; cd project/package ; pip install -e .\nRun Code Online (Sandbox Code Playgroud)\n 我正在尝试将我的应用程序节点后端更新为打字稿,但我一直遇到此语法错误:
/Users/Shared/website/src/server.ts:1
(function (exports, require, module, __filename, __dirname) { import *
as express from 'express';
^
SyntaxError: Unexpected token *
Run Code Online (Sandbox Code Playgroud)
我的 tsconfig/webpack/server 等设置如下:
服务器.ts
import * as express from 'express';
import * as path from 'path';
const app = express();
const port = process.env.PORT || 3000;
app.use(express.static(path.join(__dirname, 'dist')));
app.get('*', function(req, res, next){
res.sendFile(path.resolve(__dirname, '/public', 'index.html'));
});
app.listen(port, () => console.log(`Listening on port ${port}!`));
Run Code Online (Sandbox Code Playgroud)
webpack.config.json:
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const CopyWebpackPlugin = …Run Code Online (Sandbox Code Playgroud)