Code Monkey home page Code Monkey logo

Comments (10)

bdkjones avatar bdkjones commented on June 17, 2024 1

Sigh. I know what's up. The engine in CodeKit 3 is still the old Jade compiler. It doesn't know what the hell a *.pug file is. I forgot to switch the engine to the Pug NPM module. Will resolve in the next beta.

from codekit.

bdkjones avatar bdkjones commented on June 17, 2024

Well...that's super weird. I'll have to test it on my machine. I have zero ideas why the file extension would matter, but technically it's the pug compiler that writes the file.

Sent from my iPhone

On May 18, 2016, at 11:17, Michael Russell [email protected] wrote:

Quick, short summary

I was trying to use the new .pug extension for .jade files and it compiled successfully but I was hit with a write permissions error. Changing the extension to .jade fixed the write permissions error and index.html was created successfully.

Expected results

saving the index.pug file to create a index.html file

Actual results

index.pug was compiled successfully but CK was unable to write to my file system due to a permissions error. I check the permissions and all is fine, and it's especially interesting that the .jade variant was OK with being written to that folder.

Exact steps to reproduce

created a simple project with a source/ and build/ work flow
add a minimal index.pug file with doctype/head/body/h1
save index.pug

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

from codekit.

subhaze avatar subhaze commented on June 17, 2024

Yeah, that's what I was wondering, if you were using a different compiler for .pug vs .jade.

I'll do some more testing on my end, setup a new project, etc... and see what happens

from codekit.

subhaze avatar subhaze commented on June 17, 2024

yeah, appears to be due to the compiler used for .pug, just tried on a fresh project. compiled successfully, write permission error at end.

from codekit.

bdkjones avatar bdkjones commented on June 17, 2024

Ah. I think I know what this is. Does the output FOLDER where the compiled HTML is going to appear already exist? I believe the problem is that the Pug compiler may be too stupid to create the output folder's path if it doesn't already exist.

from codekit.

bdkjones avatar bdkjones commented on June 17, 2024

Or the opposite: does the output FILE (index.html) already exist and you're trying to overwrite it? If so, Pug may not be overwriting the file correctly.

That "permissions" warning is a generic "I have no fucking clue why this failed, it's probably permissions" message that I spit out whenever the language compiler tells me that it compiled successfully but couldn't write to disk.

from codekit.

subhaze avatar subhaze commented on June 17, 2024

In my testings I've tried:

  • produce .html beside .pug file
  • produce .html in build/ which was already created

both failed but .jade was successful

Also, found that if the .html already exists, triggering a .pug compile will delete that file.

Have you been able to reproduce?

from codekit.

bdkjones avatar bdkjones commented on June 17, 2024

Can you give me the contents of the pug file you're compiling? I don't know Pug.

from codekit.

subhaze avatar subhaze commented on June 17, 2024
doctype html
head
    script.
        var test = 'test';
body
    h1 Test

from codekit.

bdkjones avatar bdkjones commented on June 17, 2024

Fixed for Beta 2.

from codekit.

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.