GithubHelp home page GithubHelp logo

Comments (12)

Phaiax avatar Phaiax commented on September 24, 2024

Hm. it should create a file called out.js next to main.ts, second.ts and tsconfig.json.

Can you copy'n'paste the build output here please?

from arctictypescript.

jiaming0708 avatar jiaming0708 commented on September 24, 2024

It's my build log!
2015-03-29 21 59 13

from arctictypescript.

Phaiax avatar Phaiax commented on September 24, 2024

Hm. Then I need your help.

Can you restart sublime, open main.ts (so that only one typescript project is opened, because the following commands will use the first open project).

Then Build the project and execute these commands in View -> Show Console

import ArcticTypescript as a
p = a.lib.system.globals.OPENED_PROJECTS.values().__iter__().__next__()
p.compiler.cwd

What is the cwd?

Is this still your single_out_file/tsconfig.json?:

{
    "compilerOptions": {
        "out": "out.js", 
        "sourceMap": true, 
        "target": "es5"
    }, 
    "files": [
        "main.ts"
    ]
}

AAAAA... I just have an idea: Does sublime have write access to the cwd path from above?

from arctictypescript.

jiaming0708 avatar jiaming0708 commented on September 24, 2024

Hi,
I follow your step, and I get an error.
I think you are right, how can I check the right?

import ArcticTypescript as a
p = a.lib.system.globals.OPENED_PROJECTS.values().iter().next()
p.compiler.cwd
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'NoneType' object has no attribute 'cwd'

from arctictypescript.

Phaiax avatar Phaiax commented on September 24, 2024

You must build first, otherwise p.compiler is None.
To test access rights: Try to save a new file from sublime inside of the single_out_file folder

from arctictypescript.

MecuSorin avatar MecuSorin commented on September 24, 2024

I have the same issue on building single_out_file (no out.js or out.js.map are generated):

 >>> ['nodejs', '/home/sorin/.config/sublime-text-3/Packages/ArcticTypescript/bin/node_modules/.bin/tsc', '--project', '.']

<<< Finished

Here is the output for the requested console commands:

>>> import ArcticTypescript as a
>>> p = a.lib.system.globals.OPENED_PROJECTS.values().__iter__().__next__()
>>> p.compiler.cwd
'/home/sorin/test/ArcticTypescript/examples/single_out_file'

I have the rights permissions to write in that folder (tested by creating and modifying a file)

The errors window is showing:

 //   /\ (long ago) 

no errors

Here is my sublime console content:

startup, version: 3083 linux x64 channel: stable
executable: /opt/sublime_text/sublime_text
working dir: /
packages path: /home/sorin/.config/sublime-text-3/Packages
state path: /home/sorin/.config/sublime-text-3/Local
zip path: /opt/sublime_text/Packages
zip path: /home/sorin/.config/sublime-text-3/Installed Packages
ignored_packages: []
pre session restore time: 0.121332
startup time: 0.270555
first paint time: 0.278919
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.quick_panel
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Vintage.vintage
reloading plugin Vintage.vintage_commands
reloading plugin Vintage.vintage_motions
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-ssl-linux
Linux SSL: successfully loaded _ssl module for libssl.so.1.0.0
reloading plugin 0_package_control_loader.02-bz2
reloading plugin AngularJS.AngularJS-sublime-package
reloading plugin AngularJS.jscompletions
reloading plugin AngularJS.message
reloading plugin AngularJS.sublime_commands
reloading plugin AngularJS.viewlocation
reloading plugin AutoFileName.autofilename
reloading plugin AutoFileName.getimageinfo
reloading plugin BracketHighlighter.bh_core
reloading plugin BracketHighlighter.bh_logging
reloading plugin BracketHighlighter.bh_plugin
reloading plugin BracketHighlighter.bh_regions
reloading plugin BracketHighlighter.bh_remove
reloading plugin BracketHighlighter.bh_rules
reloading plugin BracketHighlighter.bh_search
reloading plugin BracketHighlighter.bh_swapping
reloading plugin BracketHighlighter.bh_wrapping
reloading plugin BracketHighlighter.ure
reloading plugin Package Control.Package Control
reloading plugin Package Control.bootstrap
reloading plugin ArcticTypescript.ArcticTypescript
reloading plugin GoSublime.GoSublime
reloading plugin GoSublime.gs9o
reloading plugin GoSublime.gscommands
reloading plugin GoSublime.gscomplete
reloading plugin GoSublime.gsdoc
reloading plugin GoSublime.gsev
reloading plugin GoSublime.gslint
reloading plugin GoSublime.gspalette
reloading plugin GoSublime.gssynforce
reloading plugin GoSublime.gstest
plugins loaded
GoSublime r14.12.06-1: init mod(gs)
GoSublime r14.12.06-1: init mod(sh)
GoSublime r14.12.06-1 sh: load env vars ['/usr/bin/zsh', '-l', '-c', 'echo "..."']: go version: ['/home/sorin/go/bin/go', 'version'] -> `go version go1.4 linux/amd64
` -> `go1.4`: 0.023s
GoSublime r14.12.06-1: init mod(mg9)

** 2015-03-30 00:14:00.413768 **:
GoSublime init r14.12.06-1 (0.004s)
|   install margo: no
|   install state: done
| sublime.version: 3083
| sublime.channel: stable
|       about.ann: a14.02.25-1
|   about.version: r14.12.06-1
|         version: r14.12.06-1
|        platform: linux-x64
|            ~bin: ~/.config/sublime-text-3/Packages/User/GoSublime/linux-x64/bin
|       margo.exe: ~bin/gosublime.margo_r14.12.06-1_go1.4.exe (ok)
|          go.exe: ~/go/bin/go (ok)
|      go.version: go1.4
|          GOROOT: ~/go
|          GOPATH: ~/Documents/go
|           GOBIN: (not set) (should usually be `(not set)`)
|       set.shell: []
|       env.shell: /usr/bin/zsh
|       shell.cmd: ['/usr/bin/zsh', '-l', '-c', '${CMD}']
--------------------------------

ArcticTypescript: notify  : Try open project: /home/sorin/test/ArcticTypescript/examples/single_out_file
ArcticTypescript: notify  : starting tsserver /home/sorin/test/ArcticTypescript/examples/single_out_file/tsconfig.json
ArcticTypescript: notify  : Initializion finished

from arctictypescript.

jiaming0708 avatar jiaming0708 commented on September 24, 2024

I can create and save file from sublime.

Here is the cwd

'/Users/jimmy/Downloads/ArcticTypescript-master/examples/single_out_file'

tsconfig.json still is

{
    "compilerOptions": {
        "out": "out.js", 
        "sourceMap": true, 
        "target": "es5"
    }, 
    "files": [
        "main.ts"
    ]
}

from arctictypescript.

milks808 avatar milks808 commented on September 24, 2024

Having the same issue here, first time user of ArcticTypescript

my tsconfig.json

{
    "compilerOptions":
    {
        "out": "build.js",
        "sourceMap": true,
        "target": "es5",
        "noImplicitAny": true
    },
    "files":
    [
        "script/setup.ts",
        "typings/three.d.ts"
    ]
}

cwd is reported as 'c:\users\a-maan\desktop\ts3' I have verified that Sublime can write to this dir. Have also tried the outDir option with no success

ST3 Build 3083

from arctictypescript.

Phaiax avatar Phaiax commented on September 24, 2024

Hmmmmmm very mysterious. Maybe just a problem with the recent build of typescript. I updated the provided typescript compiler. Try again with version 0.6.5 please.

This version does not have the examples included anymore, you need to download them seperately.
(refer to #41 to see why)

You can download the zip here: https://github.com/Phaiax/ArcticTypescript/archive/master.zip
or for linux users use the command mentioned here: https://github.com/Phaiax/ArcticTypescript/blob/0.6.5/examples/INFO

If you still can't compile, please raise your hands again 🎱

from arctictypescript.

jiaming0708 avatar jiaming0708 commented on September 24, 2024

Cool, It works!!

Thanks your support!

from arctictypescript.

MecuSorin avatar MecuSorin commented on September 24, 2024

It works for me too with the latest master! /play yodel (I deleted the ~/.config/sublime-text-3/Packages/ArcticTypescript folder and used git clone https://github.com/Phaiax/ArcticTypescript.git in Packages folder).

👍 Thank you for the great job! Happy coding!

from arctictypescript.

Phaiax avatar Phaiax commented on September 24, 2024

@MecuSorin make sure to git pull from time to time. Otherwise you'll miss future updates. Or go back to the automatically updated version using PackageControl

from arctictypescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.